Complexity - why is RL=NL when omitting the demand for polynomial run-time? The complexity class RL is described at the complexity zoo as: Has the same relation to L as RP does to P. The randomized machine must halt with probability 1 on any input. It must also run in polynomial time (since otherwise we would just get NL).
The question is - how can we get NL when omitting the demand for polynomial time? I have a solution of my own but it seems strange to me.
My solution: If suffices to solve ST-CON. We can use the same NL algorithm for ST-CON (guessing a path) with one major difference - we count the number of steps we make, and if it suppresses the number of vertices in the graph, we restart the computation, without remembering ANYTHING.
This means we can play this game indefinitely. If the graph is not ST-connected, then we'll never halt, but if it's ST-connected we'll halt in probability 1 (this is the same as saying that a geometric random variable obtains a finite value in probability 1). However, since we do not halt for NO-instances, this solution "feels wrong" to me.
Is there another solution? And is my solution correct?
 A: Your solution is almost correct.
In the definition of RL, we require that the algorithm halt with probability $1$ on any input. As you note, your algorithm runs forever on "No" instances. To fix this, we'll take advantage of the fact that we're allowed a small chance of error. In particular, we're allowed to sometimes reject "Yes" instances, as long as we never accept a "No" instance.
The basic idea is to keep a counter of how many iterations we've used so far. If a path exists, we should find it within $2N^N$ iterations (with probability at least $3/4$). So if we've gone that long without finding a valid path, we'll reject the graph. Note that we'll never accept a bad graph this way, and we'll rarely reject a good graph.
We can't naively count to $N^N$, however, since this would require $N\lg N$ space. Instead, we'll probabilistically "count" that high.
After each iteration, we'll flip $N\lg N + 2$ coins. If every coin lands heads, then we stop (and reject the graph). If at least one coin lands tails, then we begin another iteration. This can be done in log-space, since we only need to count how many flips have occurred.
The probability of getting all heads is $1/2^{N\lg N + 2}=1/4N^N$, so with probability at least $3/4$, this won't happen until at least $2N^N$ iterations have elapsed.
Taking a union bound over both ways the algorithm could fail, we see that everything works with probability at least $1/2$.
Finally, note that this halts with probability $1$, since we'll flip all heads eventually.
