5.3. NON-DETERMINISTIC SPACE COMPLEXITY using .net toembed uss code 39 on web,windows application Codabar We rst sh VS .NET barcode 3/9 ow that the computation of is log-space reducible to determining the number of vertices that are reachable (via a directed path) from a given vertex in a given graph. On input (G, s, t), the reduction computes the number of vertices that are reachable from s in the graph G and compares this number to the number of vertices reachable from s in the graph G obtained by omitting t from G.

Clearly, these two numbers are different if and only if vertex t is reachable from vertex v (in the graph G). An alternative reduction that uses a single query is presented in Exercise 5.28.

Combining either of these reductions with a non-deterministic log-space machine that computes the number of reachable vertices, we obtain a nondeterministic log-space machine that computes . This can be shown by relying either on the non-adaptivity of these reductions or on the fact that the solutions for the target problem have logarithmic length; see Exercise 5.29.

Thus, we focus on providing a non-deterministic log-space machine for computing the number of vertices that are reachable from a given vertex in a given graph. Fixing an n-vertex graph G = (V, E) and a vertex v, we consider the set of vertices that are reachable from v by a path of length at most i. We denote this set by Ri , and observe that R0 = {v} and that for every i = 1, 2, .

. . , it holds that Ri = Ri 1 {u : w Ri 1 s.

t. (w, u) E} (5.1) Our aim is to (non-deterministically) compute .

Rn in log-space. This will be done in n iterations such that at the i th iteration we compute Ri . When computing Ri we rely on the fact that Ri 1 is known to us, which means that we shall store Ri 1 in memory. We stress that we discard Ri 1 from memory as soon as we complete the computation of Ri , which we store instead. Thus, at each iteration i, our record of past iterations only contains Ri 1 .. Computing Ri . Given Ri 1 , we non-deterministically compute Ri by making a guess (for Ri ), denoted g, and verifying its correctness as follows:. 1. We verify that Ri g in a barcode 3/9 for .NET straightforward manner. That is, scanning V in some canonical order, we verify for g vertices that they are each in Ri .

That is, during the scan, we select non-deterministically g vertices, and for each selected vertex w we verify that w is reachable from v by a path of length at most i, where this veri cation is performed by just guessing and verifying an adequate path (see Exercise 5.19). We use log2 n bits to store the number of vertices that were already veri ed to be in Ri , another log2 n bits to store the currently scanned vertex (i.

e., w), and another O(log n) bits for implementing the veri cation of the existence of a path of length at most i from v to w. 2.

The veri cation of the condition . Ri g (equivalently, . V \ Ri n g) VS .NET barcode code39 is the interesting part of the procedure. Indeed, as we saw, demonstrating membership in Ri is easy, but here we wish to demonstrate non-membership in Ri .

We do so by relying on the fact that we know . Ri 1 , which al bar code 39 for .NET lows for a non-deterministic enumeration of Ri 1 itself, which in turn allows for proofs of non-membership in Ri (via the use of Eq. (5.

1)). Details follows (and an even more structured description is provided in Figure 5.3).

Scanning V (again), we verify for n g (guessed) vertices that they are not in Ri (i.e., are not reachable from v by paths of length at most i).

By Eq. (5.1), verifying.

Copyright © . All rights reserved.