next up previous
Next: LogCFL Up: Making Nondeterminism Unambiguous Previous: Introduction

Nondeterministic Logspace

 

The s-t connectivity problem takes as input a directed graph with two distinguished vertices s and t, and determines if there is a path in the graph from s to t. It is well-known that this is a complete problem for NL [Jon75].

The following lemma is implicit in [Wig94, GW96], but for completeness we make it explicit here.

  lemma98

Proof: We first observe that a standard application of the isolation lemma technique of [MVV87] shows that, if each edge in G is assigned a weight in the range tex2html_wrap_inline648 uniformly and independently at random, then with probability at least tex2html_wrap_inline650 , for any two vertices x and y such that there is a path from x to y, there is only one path having minimum weight. (Sketch: The probability that there is more than one minimum weight path from x to y is bounded by the sum, over all edges e, of the probability of the event BAD(e,x,y) ::= ``e occurs on one minimum-weight path from x to y and not in another''. Given any weight assignment w' to the edges in G other than e, there is at most one value z with the property that, if the weight of e is set to be z, then BAD(e,x,y) occurs. Thus the probability that there are two minimum-weight paths between two vertices is bounded by tex2html_wrap_inline688 tex2html_wrap_inline690 tex2html_wrap_inline692 = tex2html_wrap_inline694 .)

Our advice string tex2html_wrap_inline696 will consist of a sequence of tex2html_wrap_inline698 weight functions, where each weight function assigns a weight in the range tex2html_wrap_inline648 to each edge. (There are tex2html_wrap_inline702 such advice strings possible for each n.) Our logspace-computable function f takes as input a graph G and a sequence of tex2html_wrap_inline698 weight functions, and produces as output a sequence of graphs tex2html_wrap_inline712 , where graph tex2html_wrap_inline714 is the result of replacing each edge e = (x,y) in G by a path of length j from x to y, where j is the weight given to e by the i-th weight function in the advice string. Note that, if the i-th weight function satisfies the property that there is at most one minimum weight path between any two vertices, then tex2html_wrap_inline714 is a min-unique graph. (It suffices to observe that, for any two vertices x and y of tex2html_wrap_inline714 , there are vertices x' and y' such that

Let us call an advice string ``bad for G'' if none of the graphs tex2html_wrap_inline714 in the sequence f(G) is a min-unique graph. For each G, the probability that a randomly-chosen advice string tex2html_wrap_inline696 is bad is bounded by (probability that tex2html_wrap_inline714 is not min-unique) tex2html_wrap_inline780 tex2html_wrap_inline782 . Thus the total number of advice strings that are bad for some G is at most tex2html_wrap_inline786 . Thus there is some advice string tex2html_wrap_inline584 that is not bad.

theorem129

Proof: It suffices to present a UL/poly algorithm for the s-t connectivity problem.

We show that there is a nondeterministic logspace machine M that takes as input a sequence of digraphs tex2html_wrap_inline798 , and processes each tex2html_wrap_inline714 in sequence, with the following properties:

Combining this routine with the construction of Lemma gif yields the desired UL/poly algorithm.

Our algorithm is an enhancement of the inductive counting technique of [Imm88] and [Sze88]. We call this the double counting technique since in each stage we count not only the number of vertices having distance at most k from the start vertex, but also the sum of the lengths of the shortest path to each such vertex. In the following description of the algorithm, we denote these numbers by tex2html_wrap_inline832 and tex2html_wrap_inline834 , respectively.

Let us use the notation d(v) to denote the length of the shortest path in a graph G from the start vertex to v. (If no such path exists, then d(v) = n+1.) Thus, using this notation, tex2html_wrap_inline844 .

A useful observation is that if the subgraph of G having distance at most k from the start vertex is min-unique (and if the correct values of tex2html_wrap_inline832 and tex2html_wrap_inline834 are provided), then an unambiguous logspace machine can, on input tex2html_wrap_inline854 , compute the Boolean predicate `` tex2html_wrap_inline856 ''. This is achieved with the routine shown in Figure gif.

   figure143
Figure: An unambiguous routine to determine if tex2html_wrap_inline856 .

To see that this routine truly is unambiguous if the preconditions are met, note the following:

Clearly, the subgraph having distance at most 0 from the start vertex is min-unique, and tex2html_wrap_inline920 and tex2html_wrap_inline922 . A key part of the construction involves computing tex2html_wrap_inline832 and tex2html_wrap_inline834 from tex2html_wrap_inline928 and tex2html_wrap_inline930 , at the same time checking that the subgraph having distance at most k from the start vertex is min-unique. It is easy to see that tex2html_wrap_inline832 is equal to tex2html_wrap_inline928 plus the number of vertices having d(v) = k. Note that d(v) = k if and only if it is not the case that tex2html_wrap_inline942 and there is some edge (x,v) such that tex2html_wrap_inline946 . The graph fails to be a min-unique graph if and only if there exist some v and x as above, as well as some other tex2html_wrap_inline952 such that tex2html_wrap_inline954 and there is an edge (x',v). The code shown in Figure gif formalizes these considerations.

   figure191
Figure: Computing tex2html_wrap_inline832 and tex2html_wrap_inline834 .

Searching for an s-t path in graph G is now expressed by the routine shown in Figure gif.

   figure233
Figure: Finding an s-t path in a min-unique graph.

Given the sequence tex2html_wrap_inline798 , the routine processes each tex2html_wrap_inline714 in turn. If tex2html_wrap_inline714 is not min-unique (or more precisely, if the subgraph of tex2html_wrap_inline714 that is reachable from the start vertex is not a min-unique graph), then one unique computation path of the routine returns the value BAD.GRAPH and goes on to process tex2html_wrap_inline806 ; all other computation paths halt and reject. Otherwise, if tex2html_wrap_inline714 is min-unique, the routine has a unique accepting path if tex2html_wrap_inline714 has an s-t path, and if this is not the case the routine halts with no accepting computation paths.

corollary252


next up previous
Next: LogCFL Up: Making Nondeterminism Unambiguous Previous: Introduction

Klaus Reinhardt
Mon Apr 28 16:41:00 MST 1997