Trying to extend the power of Nisan’s PRG for polylog passes

Noam Nisan is one of the great researchers in the world of computer science theory. His brilliant work has covered many areas from complexity theory, to his more recent work on theory aspects of games and economies. I still am at a loss why he did not win a Gödel Prize for his early brilliant research. See his terrific blog for more on his recent work.

Today we wish to talk about an approach to separating logspace from ${\mathsf{NP}}$.

Actually what I want to talk about is a seeming paradox: Why do we not already today have a proof that logspace, ${\mathsf{L}}$, is different from ${\mathsf{NP}}$? In order to show that ${\mathsf{L}}$ is different from ${\mathsf{NP}}$, we need only find a property that one class has and the other does not. Apples and oranges are different colors; apples and bananas have different skins.

Now it sounds like we can state such a property to distinguish these complexity classes: Nisan’s pseudorandom generator (PRG) fools logspace, but does not fool polynomial time, and in an even stronger sense, does not fool ${\mathsf{NP}}$. So why doesn’t this prove ${\mathsf{NP} \neq \mathsf{L}}$, or even ${\mathsf{P} \neq \mathsf{L}}$?

The quick answer is that Nisan’s PRG is only known to fool logspace machines that have a one-way input tape, or a limited number of left-to-right re-reads. The not-so-quick answer is less clear, however—it is a bit of a complicated story, one I would like to share with you. I believe it could be used to attack some of the open problems that we face. So let’s turn to the story.

The Story: Part I

The high-level point is: Nisan exhibits an unconditional pseudo-random number generator (PRG) for logspace. This generator fails to work for higher classes, even polynomial time, so this is indeed a difference between the two classes. The reason this does not lead to a separation theorem is a bit tricky.

The story starts with a paper by Matei David, Periklis Papakonstantinou, and Anastasios Sidiropoulos (DPS) that I really like and discussed earlier here.

I will first explain Nisan’s generator in the way they use it in their paper. Here ${U_n}$ and ${U_m}$ are the uniform distributions over ${x \in \{0,1\}^n}$ and ${s \in \{0,1\}^m}$, respectively. The generator ${G}$ maps an ${s}$ to an ${x}$. For any deterministic finite-state machine (FSM) ${Q}$, and state ${q}$ of ${Q}$, let

$\displaystyle \Pr_x[Q(x) = q]$

denote the probability over ${U_n}$ that ${Q}$ on input ${x}$ ends up in state ${q}$. In this manner ${Q}$ and ${U_n}$ induce a distribution on the states of ${Q}$, and by reasonable use of notation we also call this distribution “${Q}$.” We then have

$\displaystyle ||Q(U_n)-Q(G(U_m))||_1 = \sum_q \left|\Pr_x[Q(x) = q] - \Pr_s[Q(G(s)) = q]\right|.$

Let ${G: \{0,1\}^m \rightarrow \{0,1\}^n}$ be computable in polynomial time in ${n}$ and let ${\epsilon,w>0}$. Say that ${G}$ is a PRG against Finite State Machine FSMs for space ${w}$ with parameter ${\epsilon}$ if for any FSM ${Q}$ with at most ${2^w}$ states,

$\displaystyle ||Q(U_n)-Q(G(U_m))||_1 \le \epsilon.$

See their paper for all the details.

Nisan’s theorem is:

Theorem: There exists ${c>0}$ such that for any ${\ell>0}$, there exists a function ${G:\{0,1\}^{\ell^2} \rightarrow \{0,1\}^{\ell2^{c\ell}}}$ computable in time polynomial in ${2^{c\ell}}$ that is a PRG against FSMs for space ${c\ell}$, with parameter ${2^{-c\ell}}$.

The definition allows that the machine ${Q}$ can read the “random” bits ${G(U_m)}$ only once. They suggest that you think of the bits as placed on a special random tape that is one-way. The machine reads a bit, uses it any way it wishes, and then can move on to the next bit of the tape. The only way it can “recall” the exact bit is by storing it in its limited storage.

The connection to logspace is that when ${\ell = O(\log n)}$, the time to compute ${G}$ is polynomial, and the number of states of ${Q}$ is polynomial. A logspace Turing machine ${M}$ has only polynomially many possible worktape configurations, which can become the states of the FSM ${Q}$. However, the conversion requires the same sequential-only access to the input by ${M}$ as ${Q}$ has. A two-way FSM can be converted into a one-way FSM via a crossing sequence argument, but this can require an exponential blowup in the number of states. Our question is whether one can effectively compromise by allowing ${\mathsf{poly}(\ell)}$ passes over the input, and exploit a greater power of non-determinism in a scaled-down situation.

The Story: Part II

The basic thought is to try and exploit the distinction that Nisan seems to create and use it to prove a separation theorem. Consider a logspace machine ${M_{1}}$ that only uses its own input tape to get ${n}$—this helps avoid any issue with the input tape causing any extra complexity. Suppose the machine uses ${R}$ as its random tape. It reads the random bits from ${R}$ and makes some decision based on the randomness. The key is that the ${R}$ can be generated by a PRG and not be real randomness. This “fools” the logspace machine.

Suppose now that ${\mathsf{L} = \mathsf{NP}}$; we may be able to handle a weaker assumption, but let’s use this one for now. Then consider a new machine ${M_{2}}$ that is nondeterministic and runs in polynomial time. It operates as follows: it reads some of the tape ${R}$, and then stops reading. It guesses the seed that the PRG may have used. Then it checks that its guess is correct. If not it rejects. If yes then it computes the next unread random bit, and uses the its knowledge to “cheat.” This makes the PRG fail since it cannot fool this machine.

That is the high-level idea. The key question is: why does this not contradict ${\mathsf{L} = \mathsf{NP}}$? The logspace machine was fooled and the ${\mathsf{NP}}$ machine was not fooled. Seems like a proof to me—where did we go wrong? Note also that ${M_2}$ uses non-determinism only to guess a relatively short seed, so this would separate ${\mathsf{L}}$ from a subclass of ${\mathsf{NP}}$.

The answer is that on close examination what we really proved is this: Treat the random tape ${R}$ as the real input tape for both machines. If they both can only read the tape once left-to-right, then the logspace machine is weaker than the ${\mathsf{NP}}$ machine. But this says nothing about ${\mathsf{L} = \mathsf{NP}}$. The difficulty is that restricting the logspace machine to read the input once is huge, while the same restriction for the other machine is nothing. Clearly the second machine can first copy the ${R}$ tape into a temp storage area and read it over and over.

Note that a logspace machine that can only read its input tape once, left-to-right, is really just a finite state automaton. More exactly, for each input length ${n}$ it yields an FSM with ${\mathsf{poly}(n)}$ states. We can show that such machines ${M}$ cannot even do trivial tasks like accept the language

$\displaystyle \{ x\#x | x \in \{0,1\}^{*} \}.$

Indeed, for each ${x}$ take ${S_x = (q_1,q_2,\dots)}$ to be the sequence of states ${M}$ is in counting only the times it moves rightward off the ${\#}$ character, in its accepting computation on input ${x\# x}$. Then we must have ${S_x \neq S_y}$ whenever ${x \neq y}$, as else we could reconstruct accepting computations of ${M}$ on the bad inputs ${x\# y}$ and ${y \# x}$. Thus some ${S_x}$ must embody close to a linear number of passes, or there must be more than ${\mathsf{poly}(n)}$ states.

The Story—Part III

The restriction to reading the random tape ${R}$ only once seems to make the difference between the (one-way) complexity classes uninteresting. But wait. The paper of DPS shows that it is possible to read the tape ${R}$ multiple times for the Nisan generator. If it were possible to read the tape a polynomial—or even linear—number of times then this really would yield a proof that ${\mathsf{L}}$ is not equal to ${\mathsf{NP}}$.

The result of DPS is that Nisan generator’s still works if ${\log\log n}$ passes are allowed over the random tape. This is way too few for the above argument to work, but it is suggestive, and DPS do mention the possible connection between PRGs and complexity separations.

Recently Ken, H. Venkateswaran, and I have started to discuss how we might make a tight connection between the power of Nisan-like generators and complexity separations. Venkateswaran has worked for years on related problems in this area, and once had a paper on extending Nisan’s PRG to fool Auxiliary Pushdown Automata.

Let’s make a definition. Say a PRG is a strong Nisan generator if it fools logspace as his generator does, uses a seed of size ${\ell = O(\log^{c} n)}$ for some absolute ${c}$, allows computing each random bit from the seed in ${\mathsf{poly}(\ell)}$ size, and fools machines that make ${\log^{d} n}$ passes for any fixed ${d}$. Then I believe—we believe?—that this would prove a separation theorem:

Conjecture: The existence of a strong Nisan PRG implies ${\mathsf{L} \neq \mathsf{NP}}$.

The sketch of the proof is based on assuming that the two classes are equal. Then we scale down to make a nondeterministic machine ${M_3}$ that reads only a poly-log number of bits and then guesses the seed. If the guess is correct, ${M_3}$ can use this knowledge operating deterministically to make the PRG fail. Scaling down the input size comes from focusing on subsets of the bits produced by Nisan’s generator and using the fact that those bits are ${\mathsf{poly}(\ell)}$succinct. It also implies that we are making full use of non-determinism relative to the input size, rather than guessing only polylog bits. We are working on the details, and hope to achieve them soon.

Open Problems

Can we prove that there is a strong Nisan generator? Note that we can weaken the error bounds on the generator: I believe the PRG need only be uniform with ${\epsilon}$ error, rather than polynomially small error. I think this could be a viable approach to proving such great theorems. What do you think?