Due Wednesday September 3 1. Show from first principles that there is no finite state machine that accepts the language of formulas of the form x+y=z, where natural numbers x, y and z encoded in binary in the standard way, and where x plus y is indeed equal to z. So for example the input "10100+111=11011" is in the language. So intuitively this shows that finite state machines can not "add" in the most obvious intepretation of "add". 2. Show that there is a finite state machine that can accept the language over a string of 8 symbols, that intuitively mean [000] [001] [010] [011] [100] [101] [110] [111] where the first column plus the second column is equal to the third column. So to reuse our example from problem 1, the 5 symbol input [101][001][110][011][011] is in the language because 10100+111=11011. For simplicity, you may assume that you can read the input tape in either direction (though this assumption isn't strictly necessary). So intuitively this says that finite state machines can "add" for some reasonable intepretation of "add". Due Friday September 5 3. Consider a programming language PL2 that only has one type of loop, and the number of iterations of the loop must be determined when the loop is first encountered. So a loop statement might look like "Repeat n times", and the variable n is evaluated when the statement is reached. So all PL2 programs must halt on all inputs. Show by diagonalization that there is a problem computable by a Java program that is not computable by a PL2 program. Give a concrete example of a problem that it not computable by a PL2 program, that is computable by a Java program. Due Monday September 8 4. Consider the following decision problem. The input consists of a collection of types of unit squares, four finite state machines that we will call L, R, T, and B, and a collection of color rules. a UNIT SQUARE TYPE is an ordered 4-tuple of colors (there is no a priori bound on the number of possible colors) meaning that you can use as many unit squares as you like that have these four colors in clockwise order around the outside. For example, a unit square type might be (red, red, blue, green). A color rule is a pair of colors meaning that square sides of these colors are allowed to touch. For example, a color rule might be (red, blue). Each of the four finite automata take as input a string of colors, and either reject or accept the string. The decision is to determine whether there is a rectangle filled with available types of unit squares, placed to obey the color rules, where the colors on the top are accepted by T, the colors on the left are accepted by L, the colors on the right are accepted by R, and the colors on the bottom are accepted by B. Show that there is not algorithm to solve this problem. Hint: Recall the proof that the term rewriting problem is not computable. Think of row i of the rectangle as being the configuration of a Turing machine after step i. Think of a sequence of rows as being a computation history. Think of many of the colors encoding either some small string of tape symbols, or a position of the tape head, the state in the finite state control, and some tape symbols. The only issue that is not straightforward is how to guarantee consistency when the tape head moves. To handle this, think about there being some overlap in information between consecutive colors on the bottom/top of a row. The above problem is conceptually straight-forward. But I wouldn't be surprised if many groups go caught up by the details. Please think about this a bit before class on Friday, so you can ask me about it. Due Wednesday September 10 5. The goal of this problem is to finish up the proof in class of a version of Goedel's incompleteness theorem that there is no complete sound axiomatization of standard arithmetic. Consider an string S that represents the computation history of a particular Turing machine T, e.g. S = S1#S2# .... #SK for a computation that takes K steps. Here Si is the state on the ith step. The number of symbols J in each Si is the number of states in T plus the size of the tape alphabet for T plus one symbol to represent the position of the tape head. Consider S as a base J integer. Explain how to express the informal sentence "S represents a valid computation for T" as a first order logical sentence using standard arithmetic operators such as plus, minus, times, division, mod, floor, ceiling, equals, less than, etc and standard logical operators: and, or, not, etc. Note that this is required for the proof of that there is no complete axiomatization of standard arithmetic. Due Friday September 12 6. Problem 15 from chapter 1 of the version of the Arora and Barak text on their web site. This is the problem on Rice's theorem. Remember you are not allowed to look at other sources for a solution. Due Monday September 15 (There will be no class that day, so email a pdf to Christine or put hard copy in her mail box before 11:30, ) 7. Consider first order logical sentences of arithmetic where your are allowed to use = and +. Without loss of generality we may assume that the only logical operators are AND and NOT, and that all quantifiers appear first. So you might have a formula like: THEREEXISTS x FORALL y FORALL z THEREEXISTS w such that (x+y=z) AND NOT (y+z=w+x) Our goal here is to show that there is an algorithm to accept exactly the language of true formula using the following strategy. Recall from problem 2 that we know how to build a finite state machine that accept tuples (x,y,z,w) properly encoded that satisfy (x+y=z) and a finite state machine that accepts tuples (x, y, z, w) properly encode that satisfy (y+z=w+x). Explain why if you have finite state machines for (x+y=z) and (y+z=w+x), you can get a finite state machine to tuples (x, y, z, w) properly encode that satisfy (x+y=z) AND NOT (y+z=w+x). Now consider the quantifiers from the inside out. Explain how to construct a finite state machine that accepts tuples (x, y, z) properly encoded with the property that THEREEXISTS w such that (x+y=z) AND NOT (y+z=w+x) Explain how to construct a finite state machine that accepts tuples (x, y) properly encoded with the property that FORALL z THEREEXISTS w such that (x+y=z) AND NOT (y+z=w+x) Extend this to the whole formula. Then explain how to use the final finite state machine to get your final answer. It is OK for your write up to use this example, but it should also explain how the algorithm would work on a generic instance. Concentrate on high level ideas, not low level details. Recall the following definitions Definition of entropy of a probability distribution X over a set U: H(X) = Sum_{x in U} prob(x) lg (1/prob(x)) Definition of conditional entropy of probability distributions X and Y: H(X|Y) = Sum_{y} prob(y) Sum_{x} prob(x|y) lg 1/prob(x|y) = Sum_{x,y} prob(x,y) lg 1/ prob(x|y) Definition: Mutual information between X and Y is: I(X;Y ) = H(X) - H(X|Y ) >=0 It measures the average reduction in uncertainty (measured in bits) about x that results from learning the value of y, or vice versa. Definition of channel capacity C = max_X I(X;Y ) where the maximum over all probability distributions X over A, the alphabet of sent symbols Due Wednesday September 17 (There will be no class that day, so email a pdf to Christine or put hard copy in her mail box before 11:30) 8. Consider the following channel: AB 0 1 0 P(B=0|A=0)= .9 P(B=1|A=0)= .1 1 P(B=0|A=1)=.2 P(B=1|A=1)=.8 Here A is the sent bit and B is the received bit. Let p be the probability that A=0. Write a formula for each of H(A), H(B), H(A|B), H(B|A), I(A;B), I(B;A) These will each be a functions of p. Compute the channel capacity C of this channel. Due Friday September 19 (There will be no class that day, so email a pdf to Christine or put hard copy in her mail box before 11:30) 9.Give a formal proof that I(X;Y)=I(Y;X). That is that H(X) - H(X|Y )= H(Y)-H(Y|X). Try to give the best intuitive explanation that you can why it makes sense that the channel capacity is the same in both directions. Due Monday September 22 9. We consider an asymmetric version of the game battleship http://en.wikipedia.org/wiki/Battleship_(game) played on a 4 by 1 board. There are two players, a battleship hider and a guesser. We assume that a battleship is of size 2. So there are three possible strategies for the hider, he can put the battleship in either squares (1,2), (2,3) or (3,4). The guesser then asks one by one about one of the four squares. After each question, the hider must answer truthfully whether the battleship is in that square. The hider is trying to maximize the number of questions asked, and the guesser is trying to minimize the number of questions asked until the battleship is sunk, that is, until the questioner has asked about both squares that contain the battleship. So the payoff to the hider is the the number of questions and the payoff to the seeker is the negative of the number of questions. The guesser has 4! oblivious strategies, where oblivious means that the square asked about in each question does not depend on the answers to the previous questions. But there are also non-oblivious strategies, such as: ask about square 2 first and then if the answer is yes ask about squares 1, 3, and 4 in that order, and if the answer is no then ask about squares 3, 4 and 1 in that order. Find a mixed Nash equilibrium for this game. In English explain the strategies for each of the hider and guesser corresponding to this mixed Nash equilibrium. Explain how you could check that this is indeed a mixed Nash equilibrium. You don't actually need to carry out this check. You need only intuitively convince yourself that this is a mixed Nash equilibrium. Hint: First eliminate from consideration strategies for the guesser that will have probability zero in the mixed Nash, e.g. guess square 1 first and then if the answer is yes, guess square 4 next .... Then use symmetry to reduce the number of cases. For example, by symmetry the probability that the hider will pick (1, 2) must be equal to the probability that the hider will pick (3, 4). You can reduce the number of hiding strategies to 2, and the number of guessing strategies to 4. Then you will have to play around a bit. Due Wednesday September 24 10. Consider the language {M | M is Turing machine such that there exists a polynomial p such that on all inputs of size n, M halts within p(n) steps in either an accepting or a rejecting state} a) Can you show that this language is in P, the class of polynomial time decidable languages? Can you show that this language is not in P? b) Can you show that this language is in NP? Can you show that this language is not in NP? C) Can you show that this language is in co-NP? Can you show that this language is not in co-NP? d)Can you show that this language is decidable? Can you show that this language is not decidable? Due Friday September 26 11. Problems 8(a), 10, and 11(a) from chapter 5 of the text Due Monday September 29 12. Problem 3 from chapter 5 of the text. Note that you don't need to know what 3SAT is, all you need to know is that 3SAT is an NP-complete language and thus it's complement is an coNP-complete language Hint: As a warm-up show that if 3SAT is poly time reducible to its complement, then the complement of 3SAT is poly time reducible to 3SAT. Note that this is trivial if you allow an arbitrary polynomial time algorithm for the reduction, you just toggle the bit/answer that your procedure call gives you. Here all reductions must be many-to-one. Recall that that means that in a reduction from X to Y, you only get one procedure call to the procedure for Y, and the reduction must return the same answer as the procedure for Y does. Obviously NP is in PH. So you need only show that 3SAT and its complement are poly time reducible to each other, then PH would then be in NP. It is sufficient to show that given a language in Sigma_i^p, that one can find an NP machine to accept that language. Obvious this NP machine will have a reduction between 3SAT and its complement as a component. Due Wednesday September 31 13. Problems 14, 15 and 18 from Chapter 2. Reduce only from problem shown to be NP-complete earlier in the chapter. Note that 14 and 18 are quite straight-forward. Maybe 15 is a bit trickier. Due Friday October 3 There will not no class this day, so email your solutions to Christine or put your solutions in Christine's mailbox by 11:30 14. We consider a generalization of the Fox, goose and bag of beans puzzle http://en.wikipedia.org/wiki/Fox,_goose_and_bag_of_beans_puzzle The input is a graph G an integer k. The vertices of G are objects that the farmer has to transport over the river, there are an edge between two objects if they can not be left alone together on the same size of the river. The goal is to determine if a boat of size k is sufficient to safely transport the objects across the river. Show that this problem is NP-hard. That is, that every problem in NP many-to-one reduces to this problem in polynomial time. Hint: Remember the problems that you showed were NP-complete on Wednesday's homeworks. Which one of those problems is most related to this problem? Extra Credit: Show that this problem is in NP. Due Monday October 5 15. Consider the mapping from a Boolean formula in conjunctive normal formula to a two person game given in http://www.cs.pitt.edu/~kirk/cs3150spring2008/Homework2-reduction.ppt Understand the mapping. Give the game that would be given by this mapping when the formula is (x or y or not z) and (x or not y or z) and (not x or y or z) List all the mixed Nash Equilibrium for the resulting game. Pick one of the mixed Nash that correspond to a satisfying assignment from the formula, and explain why the row play wouldn't change his probability distribution given the column's player's distribution (by symmetry of the game the same explanation will work if the row and column players roles are reversed). Due Wednesday October 7 16. Problem 3 from chapter 3 of the text. The first question you should ask yourself is whether the B constructed in Theorem 3.9 decidable in time 2^n^k for some constant k. If not, can you modify B so that it will be computable in exponential time? Due Friday October 9 17. Problem 6.15 from the text. Give a reduction from the circuit value problem that can be parallized. You can find a definition of linear programming here http://en.wikipedia.org/wiki/Linear_programming if there isn't one in the book. 18. Problem 6.11. The first sentence should read: Show that NC^1 is a subset of LOGSPACE. First you need to look up the definition of L=LOGSPACE. Basically the input tape is read only, and you have a write only output tape, and you can use only log of the input size space on your one read/write tape. It is sufficient to construct a log space machine M that takes as input a (C, I) where circuit C of polynomial size in |I| and log |I| depth, and I specifies values for the input lines to C, and M outputs the value of unique output line of C when I is the input to C. Take for granted that you know how to access any gate or line in C that you wish. Assuming this, give a high level explanation how you can compute the value using only log space. This is easy, so if you are struggling, step back and try to get the big picture. So we show here how to simulate fast parallel computation by low space computation. This completes the other half of the picture of the parallel computation thesis http://en.wikipedia.org/wiki/Parallel_computation_thesis I showed in class how to simulate low space computation by fast parallel computation. In chapter 3 it is shown via diagonalization that LOGSPACE is strictly contained in PSPACE. So the conclusion in the second sentence is trivial given this fact. Due Tuesday October 14 19. Problem 5 from chapter 7 of the text Due Wednesday October 15 20. Problem 6 from chapter 7 of the text Due Friday October 17 21. Sign in with Kirk at Michel Goeman's lecture http://www.cs.pitt.edu/events/DL/2009/michel-goemans.php Due Monday October 20 22. Problem 2 from chapter 8 in the text Hints: Let z be a random number less than m. If y is a quadratic reside, then y*z^2 is quadratic residue (this should be obvious). If y is a nonquadratic residue then y*z^2 is a nonquadratic residue (this should be obvious), and furthermore y*z^2 is a random nonquadratic residue (this may not be so obvious). Now think about the interactive proof for socks, or money changing for a blind guy, or for the first protocol that we learned for graph isomorphism. The protocol has very much the same flavor. Due Wednesday October 22 23. Problem 1 parts d and e from chapter 8 in the text Hints: For part d, recall the proof of Theorem 7.18 from the book. For part e, note that it is obvious that NP is a subset of IP'. Hence, you need only show that IP' is a subset of NP. So show how to simulate a protocol in IP' by an NP machine. Part e is easy, part d is maybe not so easy. Due Friday October 24 I will be out of town, so email me your solutions before 11:30 24. Problem 4 from chapter 8 of the text Due Monday October 27 I will be out of town, so email me your solutions before 11:30 25. Problem 6 from chapter 8 of the text. Hint: Note that an MA protocol consists of a message from the prover, followed by randomized computation by the verifier. Note that we already know that MA is in exponential time. So you need only show that then exponential time is in MA using the assumption that exponential time languages by polynomial size circuits. Due Wednesday October 29 26. Problem 9.5 from the text Due Monday November 3 27. Read and understand the protocol in problem exercise 9.17 part b from the text. Write a one paragraph summary of the protocol in your own words. Do your best to formulate a precise formal definition of "computational zero knowledge" that plausibly this protocol might have. Explain why this protocol would seem to have this property. If you have a fully formal definition, and a full proof, great. But I would be satisfied with a reasonably formal definition, and an intuitive explanation why it would seem that this protocol has this property. Due Friday November 7 28. Work out in detail the probability that Alice and Bob observe a=b in the case that x=y=1 in the EPR experiment in the book. Show every step of your calculations, and give lots of explanation. Due Monday November 10 29. Give a strategy that allows Alice and Bob to win the Parity Game in the EPR experiment with probability cos^2 pi/8 = .85 (instead of the probability .8 for the strategy in the book). Give a lot of explanations for your calculations. Hint: Assume that Alice rotates her bit by an angle -alpha if x=0 and an angle +beta if x=1. Bob rotates his bit by an angle +alpha if y=0 and angle -beta if y=1. Now find the alpha and beta that maximize Alice and Bob's chance of winning. Due Wednesday November 12 30. Consider the same set up as the parity game. Alice and Bob split two entangled bits. Alice and Bob are then split up. Alice is then given 2 classical bits x and y. Depending on the value of x, and y, Alice sends Bob 1 qubit. From this single qubit, Bob determines with certainty the two classically bits x and y from his entangled bit and the sent qubit. Explain how to accomplish this. You need to explain Alice's encoding strategy, Bob's decoding strategy, and why these strategies work. Note that you can extend this to allow for the transmission of 2n classical bits using only n quantum bits. Hint: The 4 possible states of the sent qubit will be + 1/sqrt(2) |0> + 1/sqrt(2) |1> + 1/sqrt(2) |0> - 1/sqrt(2) |1> - 1/sqrt(2) |0> + 1/sqrt(2) |1> - 1/sqrt(2) |0> - 1/sqrt(2) |1> Due Friday November 14 I'll be out of town, email me your solution before noon. 31. The goal of this problem is to find a way to transmit information about a qubit by sending two classical bits. Alice and Bob split up entangled bits |ab| in state |00> + |11>. Assume that now Alice is given qubit x. So x is in some unknown superposition between states |0> and |1>. Alice now performs the following reversible operation on x, if a=1 then negate x. Alice then runs qubit a through a Hadamard gate. Alice now measures the current values of a and x, and sends these two classical bits to Bob. Explain what the state of all the particles a, b, and x is after each of Alice's operations. Then explain how Bob can use the two classical particlars to change the state of b to the original state of x. Note that when Alice measures a and x, then she can no longer recover the original state of qubit x. Due Monday November 17 Email me your solution before noon. 32. As a warm-up, given n numbers x_1 ... x_n and a number L, explain how to in sqrt(n) time determine if any of these numbers are less than L using a quantum algorithm (Hint: Grover's algorithm). Now consider the problem of of given n numbers x_1 ... x_n and a number L, explain how to in sqrt(n) time return uniformly at random one of the x_i's that is less than L using a quantum mechanical algorithm. (Hint: Grover's algorithm). Now consider the problem of finding the minimum of n numbers. Explain how to use find the minimum of n numbers in sqrt(n) polylog(n) time using a quantum mechanical algorithm. Hint: Reduce to the previous problem. Due Wednesday November 19 Email Christine (chung@cs.pitt.edu) your solution before noon. 33. Problem 11.7 from the text. This should be pretty straightforward. Just convert the interactive proof for the permanent from chapter 8 as the interactive proof for graph non-isomorphism was converted in example 11.7. Due Friday November 21 Email Christine (chung@cs.pitt.edu) your solution before noon. 34. Problem 11.16 from the text. Note that the problem allows for rational solutions (otherwise the problem would be trivially NP-hard as deciding whether a system of linear equations are all satisfiable over the integers is NP-hard). Hint: There is a simple reduction from MAXSAT. YOU ARE NOW DONE WITH THE HOMEWORK !!!!!!!!!!!!!! HAPPY THANKSGIVING !!!!!!!!!!!!!!!!!!!