Questions are in black, answers in blue.
Yes, but we refer to p-1 as "-1" because it is the additive inverse of the multiplicative identity and thus shares all the interesting properties of -1, particularly that it and 1 are the only square roots of 1 if p is prime.
No, this could happen, but (a) you need a separate pipe from each well to the main pipeline, and (b) these pipes may go along the same course (perhaps stacked vertically?) and you are charged for the length of each of them.
Right, the point is that if k and ε are constants, the time is polynomial in n. The dependence on k and ε need not be polynomial.
I admit that this is a little unclear, but look at my formulation in Question 3.9 of the Q&A below. What the result I quote needs about s2r is that it is even, and that as2r is guaranteed to be 1 -- this holds for both the lecture situation and in 3.3c.
Yes, if it's easier you may change the "at least" to "more than" in 3.4b. But I don't think you need this -- the probability of success is "at least 1 - ε" iff the probability of failure is "at most ε".
Yes, this is a mistake on my part. The result that I meant to refer to was that if you have an algorithm that gives you φ(k) for any k, you can use the various parts of this problem to factor any n completely. But 3.3c should just ask you to find two nontrivial factors.
The point of this problem is to see that you understand enough of the number theory to get the sketch proof I gave in Lecture 14, that the Miller-Rabin primality test has at most a 1/2 probability of failure. In that argument I quoted without proof a particular fact about the numbers as, a2s,..., a2rs when a is chosen uniformly at random and a2rs is guaranteed to be 1. You'll want to quote this fact and apply it to solve (c).
You should treat ε as an input to the problem. In (a) you must show that given n and ε, you can find a c that works. In (b) you are given k, n, and ε and you have to find f(n). You say ε is positive -- may I assume that it is at most 1? If ε > 1, you are guaranteed that no more than ε2n strings of length n have any property you like, because there are only 2n strings. Where does the variable δ from the Chernoff bounds come in?
First off, note that the problem statement doesn't even mention probability, so if a rondom process is to be involved in the problem you are going to be the one to introduce it. So it's up to you what kind of process gives rise to a binomial random variable for which the Chernoff bounds are relevant. Once you have such a variable, the Chernoff bounds are true for any δ in the given ranges. This means that you should pick a value for δ, so that the bounds will give you the result you need. Thus your δ will probably depend on the other input variables of the problem.
You may cite either of those authorities. The point of this problem is to explain exactly how the solution to this other problem may be used to place the pipeline. This is just like quoting the running time of depth-first search, for example. There is certainly no point in making you copy out portions of the text in your homework!
This is not what I meant, but I admit that what I wrote was ambiguous and I've now clarified it. The value of the root is defined in terms of the value of all the leaves, but may not depend on the value of all the leaves. By "evaluate each internal node", I meant that you could do this in order to define the value of the root -- I did not mean to imply that reporting results for all the internal nodes was a necessary requirement of evaluating the tree.
Whoops, this is another mistake on my part which I've now corrected. Your algorithm only needs to use a polynomial number of regular expression operations. The simplification you mention may not be possible in general -- in any case we are concerned with the expressions that this algorithm actually creates rather than some hypothetical simplified ones.
I added the words "in the worst case" to the problem text to describe what I mean. The point is that for any possible deterministic algorithm, there is some possible input that will cause that algorithm to look at all the leaves. The way to show that this exists is an adversary argument. You show that if you are allowed to pick the answers for the leaf values with the intent of forcing the algorithm to look at all the leaves, you can do so. (So if the first thing it did was to ask about two siblings, you would give it two different answers so it would have to look eventually at the third sibling.) Because there is a consistent setting of the inputs causing it to either look at all the leaves or give a wrong answer, it must look at all the leaves in the worst case. Your job is to describe how to pick the leaf answers to make sure that this is true.
I'm defining the length of regular expressions in the problem -- I agree that my definition does not correspond to the number of characters in the string denoting the expression. I just want a simple definition that will correspond roughly to the string length -- my definition gives the number of atomic symbols and operators in the expression. I added the word "defined" to the problem to help clarify this.
Yes, the "fewer" makes the problem more complicated without being more interesting, so I've changed the problem as you suggest.
Is the definition wrong? Part (a) is easy for the case a=b=1, where the two definitions coincide, but it's not so obvious in the other cases.
Yes, I messed up the definition -- you are quite right. I've added a new part (a) that has you show that if you are given n and the correctly-defined φ(n), then you can nontrivially factor n if any prime occurs more than once in its factorization. The old part (a) is now part (b), in the case now where n=pq. As you say, this is pretty easy. Part (c) has been downgraded to 10 points to compensate.
Last modified 7 November 2005