Structure and Importance of Logspace-MOD-Classes - Semantic Scholar

Report 2 Downloads 17 Views
Structure and Importance of Logspace-MOD-Classes Gerhard Buntrocky Ulrich Hertrampf

Carsten Dammz Christoph Meinely

Abstract.

We re ne the techniques of Beigel, Gill, Hertrampf [4] who investigated polynomial time counting classes, in order to make them applicable to the case of logarithmic space. We de ne the complexity classes MOD k L and demonstrate their signi cance by proving that all standard problems of linear algebra over the nite rings Z/kZ are complete for these classes. We then de ne new complexity classes LogFew and LogFewNL and identify them as adequate logspace versions of Few and FewP . We show that LogFewNL is contained in MODZ k L and that LogFew is contained in MODk L for all k. Also an upper bound for L#L in terms of computation of integer determinants is given from which we conclude that all logspace counting classes are contained in NC 2.

1 Introduction

Valiant [21] de ned the class #P of functions f such that there is a nondeterministic polynomial time Turing machine which, on input x, has exactly f (x) accepting computation paths. Many complexity classes in the area between P and PSPACE can be de ned by a condition on f (x), for example, NP is the class of sets A such that there is a function f in #P with x 2 A i f (x) > 0. For a good survey see [11] or [19]. In analogy to this A lvarez and Jenner [2] introduced #L as the class of functions f , such that there is a nondeterministic logspace Turing machine which, on input x, has exactly f (x) accepting computation paths. Now the above characterization of NP becomes a characterization of NL, if we take f 2 #L instead of f 2 #P . Other interesting classes which can be de ned via #L are MODk L-classes, where the condition is: x 2 A i f (x) 6 0 mod k. In [2] it is proved that #L  NC 2. We improve their result and show in Section 2 that L#L is contained in DET , the class of problems which are NC 1-reducible to the computation of integer determinants (cf. [10]). Thus all the logspace counting classes are contained in DET . In Sections 2 and 4 we prove some useful closure properties of #L, which have consequences on certain relationships between logspace counting classes. These properties are analogous to similar properties of #P , but not all of the proofs carry over to #L, since nondeterministic logspace machines are not able to record their own computation history.  y z

Mathematical Systems Theory, 25:223-237, 1992 Institut fur Informatik, Universitat Wurzburg, D-8700 Wurzburg, Germany Sektion Informatik, Humboldt-Universitat Berlin, D-1086 Berlin, Germany

1

We therefore introduce new techniques that allow us to prove an analogous normal form theorem for MODk L-classes that was proved in [4] for MODk P -classes. The importance of the MODk L-classes becomes obvious if one considers the computational power comprised in these classes. In Section 3 we prove that all standard problems of linear algebra over the nite ring Z/kZ are complete for MODk L. The notion of unambiguity is of great importance for nondeterministic computations. Valiant [20] used the term unambiguous computation for the de nition of UP , the class of languages recognizable by polynomial time nondeterministic machines which never accept on more than one path. Today this type of machines is usually called unique. The power of space bounded unique computations was investigated in [8]. A di erent type of unambiguous computations refers to the number of computation paths leading to accepting con gurations. If for each accepting con guration there is at most one path, we call the machine weakly unambiguous. (Note that this de nition di ers from the de nition of (weakly) unambiguous machines in [14]). In the case of polynomial time it is no restriction if strong unambiguity1 is required, because every NP-machine can be simulated in a strongly unambiguous manner. On the other hand no such simulation is known for space bounded computations. In the case of logarithmic space bound the restriction to weakly unambiguous machines leads to a possibly proper subclass of NL that contains UL, the logspace analogon of UP . Weakly unambiguous computations on logarithmic space cannot have more than polynomially many accepting paths. The property of having only polynomially many accepting paths results in the case of polynomial time in the class FewP 2 [1], [9]. An analogous de nition of FewL is possible, but it doesn't lead to analogous results. In Section 4 we therefore introduce the class LogFewNL of languages recognizable by logarithmic space bounded weakly unambiguous machines as adequate logspace version of FewP . The generalized class Few [9] accordingly leads to a new class LogFew. We then show that LogFew is contained in MODk L for all k, and an analogous result holds for LogFewNL.

2 Closure properties of #L and MODk L-Classes

In this section we de ne the class #L as an analogon of Valiant's class #P [21], and we prove the closure of #L under addition, multiplication and binomial coecient with constants. Then we introduce logspace-MOD-classes and use the closure properties of #L to show a normal form theorem for these classes. As a consequence of this normal form theorem, all logspace-MOD-classes are closed under union.

De nition 1 A function f belongs to #L, if there is a nondeterministic logspace Turing

machine, such that for all inputs x, all computation paths terminate and the number of accepting computation paths is equal to f (x). The following lemma lists some closure properties that hold for all functions in #L.

Lemma 2

In [14] machines are de ned to be strongly unambiguous if for every pair of con gurations there is at most one computation path leading from the rst con guration to the second. 2 Allender called this class FN P , Cai and Hemachandra called it FewN P . 1

2

(i) #L is closed under addition and multiplication, (ii) If f 2 #L and k  0 is a constant, then g 2 #L, where g(x) := f (kx) . (By ab we denote the binomial coecient.) 



 

Proof: (i) is clear. (ii) Let M be a machine with f (x) accepting paths on input x. The start con guration c0 of M on input x can be written down in logarithmic space. We construct a machine M 0 as follows: On input x machine M 0 writes the start con guration c0 of M on its tape, and a counter is initialized to 1. In general M 0 will have several con gurations of M written on its tape, and the counter will tell their number. Now, in a loop, M 0 cycles through all the con gurations on the tape and each time nondeterministically chooses one of three possibilities: a) replace the con guration by its rst successor con guration b) replace the con guration by its second successor con guration c) replace the con guration by its rst successor con guration and add the second successor con guration to the list of con gurations on the tape and increment the counter by 1.

M 0 rejects if the counter exceeds k, or if any of the con gurations is rejecting, or if all con gurations are accepting but the counter is less than k. M 0 accepts if all con gurations are accepting and the counter is exactly k. The space used by M 0 is essentially the space needed for up to k con gurations of M , and so it is still logarithmic in jxj, because k is a constant. Note that this machine chooses k di erent paths of M and simulates them in parallel, i.e. this machine has exactly f (kx) accepting paths, if k > 0. The case k = 0 is trivial, because we only need a machine with exactly one accepting path on every input. 



The generalization of the second part of Lemma 2 to the case where k is not a constant is not possible with the proof technique that was used here. Therefore we will need a new method for this case, which we will develop in Section 4. Many complexity classes based on logspace computations can be de ned by posing conditions on the numbers of accepting (and/or rejecting) computation paths of a nondeterministic logspace machine. Examples are NL (as de ned in the introduction), co ? NL, and PL (cf. [6]). All these classes are subclasses of L#L , the set of languages accepted by logspace Turing machines using an oracle from #L. We will use a weak type of function oracle for the precise de nition of L#L . For a function f 2 #L let

bin(f ) := f(x; i)j the i-th bit of f (x) is 1g: 3

Then L#L is de ned by:

L#L := fAj A is logspace Turing-reducible to bin(f ) for some f 2 #Lg: Let DET denote the class of problems which are NC 1-reducible to the computation of integer determinants. Very recently A lvarez and Jenner [2] proved that #L is contained in DET . This can be sharpened, thus giving a general upper bound for logspace counting classes:

Theorem 3 L#L  DET . Proof: (sketch)

We assume familiarity with the notion of truth-table-reductions. In [13] the equivalence of Turing-reductions and truth-table-reductions is proved for deterministic logspacebounded computations. Let M be a deterministic logspace Turing machine that accepts language A using an oracle set B . Equivalently we can assume that there are two deterministic logspace Turing machines GM and EM which work as follows:  Started on input x, machine GM generates a list Query(M; x) of pairs (Ci; i), 0  i  t(x), consisting of all possible oracle queries i that M can produce on input x (independently from the oracle) and the corresponding con gurations of M (con guration C corresponds to a certain query, if in the computation tree of M on x, there is no QUERY-con guration between C and the actual QUERY-con guration, and C is either the start con guration or a YES- or NO-con guration (cf. [3])). For a set S let Answers(M; x; S ) be the list Query(M; x) with the queries replaced by the correct oracle answers, i.e. each i is replaced by 1 if i 2 S , or by 0 if i 62 S .  Started on a list Answers(M; x; S ) of pairs (Ci; bi), where the Ci's are the con gurations from the list above and the bi's are Boolean values, EM interprets the bi's as oracle answers to the queries to which the Ci's correspond, and accepts if M would accept receiving these answers. Especially, EM accepts Answers(M; x; B ) if and only if x 2 A. Now let A be accepted by the deterministic logspace Turing machine M with oracle bin(f ) and f 2 #L. Since #L  DET , the assignment Query(M; x) ?! Answers(M; x; bin(f )) can be computed in DET . On the other hand, logspace computations can be simulated in DET ([10]). Hence, the work of GM and of EM can be done within DET , thus A 2 DET .

Remark: In [10] DET is referred to as a class of functions rather than a class of languages. A standard binary encoding (as already mentioned for #L-functions) translates between

these two points of view. Therefore we will not stress the distinction between function and language classes. The following classes are de ned via functions from #L: 4

De nition 4 Let k  2 be an integer. MODk L is the class of sets A, such that there is an f 2 #L with x 2 A () f (x) 6 0 mod k: Using Fermat's Theorem it is easy to see that for prime k and A 2 MODk L there is an f 2 #L such that x 2 A () f (x)  1 mod k and

x 62 A () f (x)  0 mod k: Based on this observation one can prove a number of closure properties for MODk L if k is prime :

De nition 5 A set A  f0; 1g is said to be NC 1-reducible to a set B  f0; 1g (A  B )

if there is a logspace-uniform family C = (Cn) of circuits of logarithmic depth that contain OR?, AND? and NOT ?gates of bounded fan-in and oracle-gates for B , such that on input x of length n circuit Cn outputs 1 if and only if x 2 A. An oracle gate for B outputs 1 on those inputs belonging to B . It counts as depth log r if the fan-in is r. In fact Cook uses in [10] a stronger uniformity condition but since the oracle sets we are interested in are at least as hard as any set in L, logspace-uniformity is sucient for our purposes.

Lemma 6 Let k be a prime number. (i) MODk L is closed under intersection, union, and complement. (ii) MODk L is closed under logspace disjunctive reducibility. (iii) MODk L is closed under logspace conjunctive reducibility. (iv) MODk L is closed under join. (v) MODk L is closed under NC 1-reductions. Proof: (i) { (iv) The proofs are identical to those for MODk P (Lemma 26, (i) { (iv) in [7]). (v) Let A  B via circuit family C = (Cn). Without loss of generality assume, that

each circuit in the family is tree-structured, all gates are oracle-gates for B and all paths from one input gate to the output gate have the same length. Further let M be an NL-machine that on input x has f (x) accepting computation paths such that x 2 B i f (x)  1 mod k and f (x)  0 mod k else. Let cstart denote the start con guration of M . If c is a con guration in which an input bit is read, let c0, c1 denote the (w.l.o.g. unique) successor con gurations, if the bit read is 0, 1, respectively. We have to design an NL-machine M 0, whose number of accepting paths on input x is not divisible by k if and only if x 2 A. We make use of an idea in [17]. We 5

rst describe the work of M 0 informally and prove inductively that the number of accepting paths of M 0 on input x is not divisible by k if and only if x 2 A. We then prove that M 0 is an NL-machine. Given a certain input x of length n machine M 0 simulates the work of Cn gate by gate. Let inp(g) be the input to a certain gate g. g is simulated by starting a run of M on inp(g) as a subprocess, which we will denote by M (g) (remember that g is an oracle gate for B ). Running M (g) as a subprocess, means to store the actual con guration of M (g) together with its process-identi er PID(g) on a special worktape (the protocol tape) and to update it each time M (g) performed an operation step. PID(g) is simply the path name of g in the circuit relative to its parent gate. Our construction will ensure that at each time only one process is running. So we can organize the protocol tape in a blockwise pushdown manner. Information on the process currently running is stored in the uppermost block of the protocol. If a process stopped accepting, M 0 pops the uppermost block. If a new process is startet M 0 pushes a new block containing cstart and the corresponding PID. If g is at level 2 its inputs are inputs to the circuit and reading operations of the subprocess can be performed simply by reading from the input. If g is at an higher level then its inputs are outputs of oracle gates. In this case reading is simulated by guessing and veryfying. The idea is to achieve that wrong guessings always lead to a multiple of k di erent accepting paths, so they can't in uence the acceptancebehavior. Let g=i be the i-th successor gate of g. Suppose that M (g) in con guration c is going to read the i-th bit in inp(g). Instead of reading it, machine M 0 guesses a bit b and interrupts subprocess M (g) while storing (c; PID(g); b) in the uppermost block. If it guesses 1, then subprocess M (g=i) is startet. If this subprocess (which again may involve subprocesses) halts accepting, then M 0 continues the run of M (g) in con guration c1. Otherwise M 0 rejects. If the guessed bit is 0 then M 0 either continues to run M (g) (but now in con guration c0) or it chooses a number from f1; 2; :::; k ? 1g and starts M (g=i). In case M (g=i) halts accepting, M 0 continues the work of M (g) in con guration c0, otherwise it rejects. For any gate g let acc(g) denote the number of accepting paths of process M (g) on inp(g) if x is a xed input to the circuit. If g is on level 2 then acc(g) = accM (inp(g)). Especially inp(g) 2 B i acc(g)  1 mod k and acc(g)  0 mod k else. Now let g be a gate on a higher level and let acc(g=i)  accM (inp(g=i)) mod k for all subprocesses M (g=i) of M (g). Let c be a read i-th-bit-con guration of M and let c0 be the con guration machine M 0 has reached after guessing bit b and writing (c; PID(g); b) on the protocol tape. Remember that at the next or the next but one step process M (g=i) will be activated. Let paths(c0; b) be the number of partial computation paths of M 0 that start in con guration c0 and lead M (g=i) to accept. Finally let ab be the number of accepting paths of M 0 that continue the simulation of M (g) in con guration cb. Obviously

paths(c0; b) = b  acc(g=i)  a1 + (1 ? b)  (a0 + (k ? 1)  acc(g=i)  a0): 6

By induction hypothesis this is congruent to

paths(c0; b) = b  accM (inp(g=i))  a1 + (1 ? b)  (a0 + (k ? 1)  accM (inp(g=i))  a0) mod k: The latter expression is obviously equivalent to 0 mod k if b 6 accM (inp(g=i)) mod k. Hence only those computation paths in uence the acceptance behavior that involve only correct guessings. But guessing always correctly is equivalent to reading, so the number of accepting paths of M 0 on input x is not divisible by k if and only if x 2 A. By construction in each step of the computation the protocol tape only stores con gurations and relative path names of processes corresponding to the gates along one path in the circuit from the output gate to an input gate. Since machine M is logspace-bounded one needs only O(log(jinp(g)j)) bits to code con gurations of process M (g). By the de nition of NC 1-reducibility the overall information to be stored is at most O(log n) bits. Thus M 0 is an NL-machine and A 2 MODk L. Since the normal form theorem proved in [7] for MODk P -classes depends merely on closure properties similar to those of Lemma 2 and Lemma 6 we obtain a normal form theorem for the MODk L-classes in exactly the same manner.

Theorem 7 Let k = pe1  pe2  : : :  pemm be the prime factorization of k  2. Then A 2 MODk L if and only if there are sets Bi 2 MODpi L (1  i  m) with A = mi=1 Bi. Especially, the classes MODk L and MODp p pm L are equal. 1

2

S

1

2

Corollary 8 For all k  2 the class MODk L is closed under union.

3 Importance of Logspace-MOD-Classes

We now give a characterization of the classes MODk L by complete problems. A language A is said to be complete for MODk L if A 2 MODk L and for all B 2 MODk L holds B  A. The language MODk -GAP is easily seen to be complete for MODk L, where w is a directed acyclic graph on the vertex set MODk -GAP := w f1; : : : ; ng, whose number of paths from vertex 1 to vertex n is not divisible by k (A proof for the case k = 2 can be found in [15]. The generalization is straightforward.) Now, using an idea of Cook [10], we reduce MODk -GAP to NONSINGULARk , the set of all quadratic non-singular matrices over the ring Z/kZ. w = w w : : :w1nw21w22 : : : wnn, NONSINGULARk := w and (wij11) 12is a non-singular matrix over Z/kZ 9 =



8 < :



;





(To ease notation we allow Z/kZ together with some special characters as input alphabet. This causes no diculties since binary coding and decoding can be performed within constant space as long as k is xed.) 7

Proposition 9 NONSINGULARk is complete for MODk L. Proof: To show MODk -GAP  NONSINGULARk let A be the adjacency matrix of a directed acyclic graph G on the vertex set f1; : : :; ng. Obviously, A is an upper triangular with zero diagonal. Therefore we have An = (0). Let M = I ? A. Then M ?1 =

I + A + A2 + : : : + An?1. Observe that the (i; j )-th entry of Ak equals the number of paths of length k in G from i to j . Hence the number of paths from 1 to n equals the (1; n)-th entry of M ?1 . On the other hand, since det(M ) = 1 this entry equals the absolute value of the determinant of the matrix (I ? Aj(n; 1)) obtained from I ? A by deletion of the n-th row and 1st column. Hence the number of interest is not divisible by k if and only if (I ? Aj(n; 1)) is non-singular over Z/kZ. To show NONSINGULARk 2 MODk L we consider two cases : Case 1) : k is prime. In this case we use a construction of Berkowitz [5] which shows that the computation of determinants over a certain ring is NC 1-reducible to the computation of an iterated product of matrices over the same ring. (Refer to [10] for a de nition of NC 1-reducibility.) To be more precise we give a language de nition of the problem: ITMATPRODk := A(1); : : : ; A(n) are n  n matrices over (A(1); A(2); : : :; A(n); bin(i); bin(j ); r) Z/kZ, such that the (i; j )-th entry of A(1)  A(2)  : : :  A(n) 6 r mod k 8 >
:

9 > = > ;

Since logspace reducibility is less restrictive than NC 1-reducibility we can use this construction. It remains to show that ITMATPRODk can be computed within MODk L. We use the de nition of a matrix product in a very direct way to construct a machine M having as number of accepting paths exactly the value of the (i; j )-entry of A(1)  : : :  A(n). First M writes [1; i; j ] on its tape. Now M nondeterministically chooses a number z from the range 1; : : :; n, then M nondeterministically chooses a number w from the range 1; : : : ; A(1)iz , and replaces [1; i; j ] on its tape by [2; z; j ]. (If A(1)iz = 0 then have M reject.) Assume by induction that now on each computation path with [2; z; j ] on the tape (z = 1; : : : ; n) the machine will branch in such a way that the number of accepting paths will be the (z; j )-entry of A0 := A(2)  : : :  A(n). Then M will have n A(1) Piz A0 z=1 w=1 zj P

=

n

P

z=1

A(1)iz  A0zj = (A(1)  A0)ij

accepting paths as desired, and M as a MODk L-machine will accept if and only if that entry is not divisible by k. The induction begins with [n; w; j ] on the tape and the task to produce A(n)wj accepting paths. That is easy. Case 2) : k is composite. In this case containment in MODk L follows by the normal form theorem (Theorem 7). This completes the proof. 8

By the normal form theorem (Theorem 7) it is reasonable to consider the classes

MODk L for k prime seperately. Since in this case MODk L is closed under complement,

the test whether the determinant of a certain matrix is congruent to zero (or to any other value) modulo k can be done in MODk L. In that sense computation of determinants over Z/kZ can be done in MODk L. Together with this problem many other problems of linear algebra belong to MODk L. We will list a few of them only by suggestive names in the following theorem, since a formalization as above would be easy but tedious.

Theorem 10 Let k be a prime number. The following problems from linear algebra over Z/kZ are complete for MODk L: (i) (ii) (iii) (iv) (v) (vi) (vii)

inversion of matrices powering of matrices computation of the coecients of characteristic polynomials rank computations choice of a linearly independent subset of a given set of vectors computing a basis of the kernel of a linear map given by a matrix computing a solution of a linear system of equations.

Proof:

In [10] and [7] all these problems considered over the ring of integers have been shown to be equivalent w.r.t. NC 1-reductions. The proofs of the computational equivalence of (i){(iii) with the computation of determinants on the one hand, and of (iv){(vii) with each other on the other hand still work over Z/kZ. Using the theory of Jordan normal forms, Mulmuley proves in [16] that rank computation over some nite eld R is (w.r.t. NC 1-reductions) as hard as computing the coecients of the characteristic polynomial of a matrix over R[x]. By Berkowitz [5] the latter can be reduced to iterated matrix product over R[x]. Iterated matrix product over Z/kZ[x] can be done in MODk L. This follows from the fact that multiplication of polynomials from Z/kZ[x] can be simulated by multiplication of matrices over Z/kZ, which is easy to implement on MODk L-machines. Thus, since Z/kZ is a eld, problems (i) through (vii) are computationally equivalent w.r.t. NC 1-reductions. Remark: In case k is a composite number, problems (i), (ii), and (iii) are complete for co-MODk L.

4 Weakly Unambiguous Turing Machines

The proof of Beigel et al. in [4] that Few  MODk P for all k makes use of the fact that #P is closed under binomial coecient over functions bounded by a polynomial in the input length. Such a closure property for the logspace case cannot be obtained by a parallel simulation like the one in the proof of the second part of Lemma 2, because this would 9

need at least polynomial space. So we have to perform a serial simulation of de nitely di erent computation paths without being able to remember a computation path. This is possible if we use only machines where at least the restriction of the transition graph (on con gurations) to paths from the initial con guration to accepting con gurations is a tree, like in the example of Picture 4.1.

Picture 4.1 Hence in this case we have an accepting tree of the form that is shown in Picture 4.2.

Picture 4.2 We call machines with such a transition graph weakly unambiguous. For this type of machines we will be able to nd the right number of di erent computation paths in Lemmas 12 and 13. We now state formally what we mean by weakly unambiguous:

De nition 11 A nondeterministic machine is called weakly unambiguous if for all ac-

cepting con gurations c there is at most one computation path leading from the initial con guration (for input x) to c.

Lemma 12 Let M be a weakly unambiguous logspace machine with f (x) accepting com-

putation paths on input x, and let g be a logspace computable function. Then h 2 #L; where h(x) := fg((xx)) !

Proof:

Let M be a weakly unambiguous machine with f (x) accepting computations on input x. We have to design a machine M 0 that tries to nd exactly g(x) accepting paths of 10

machine M on input x. We have to make sure that the constructed machine nds every g(x)-tuple of accepting paths exactly once. We design M 0 as follows. On input x rst compute g(x). If g(x) is greater than the maximal number of accepting con gurations, then M 0 rejects. (Note that the number of accepting computations cannot be greater than the number of accepting con gurations.) Otherwise M 0 can write the value of g(x) on its tape. Now M 0 cycles through all con gurations of M . If the current con guration is an accepting one then M 0 nondeterministically chooses either to ignore it or to check whether there is a computation path from the start con guration to this con guration. M 0 counts how often it chose to check an accepting con guration, and M 0 accepts if and only if it checked exactly g(x) times and all checks were successful. It is easy to see that this machine has exactly fg((xx)) accepting paths on input x. Note, however, that we needed the fact that M was weakly unambiguous in the proof to make sure that M 0 can check uniquely (without generating multiple paths) the reachability of a con guration. Remark. The preceding lemma is still true when we admit some kind of bounded ambiguity, i.e. there exists a constant k, such that for every accepting con guration there are at most k computation paths from the start con guration to that con guration. The same holds for the following lemma. 



Lemma 13 Let M be a weakly unambiguous logspace machine with f (x) accepting computation paths on input x, and let k be a constant, k  2. Then h 2 #L; where h(x) := kf (x) ? 1 Proof: The proof is very similar to that of Lemma 12. Let again M be a weakly unam-

biguous machine with f (x) accepting paths on input x. Construct M 0 as follows. M 0 cycles through all con gurations of M on input x. If the current con guration is an accepting one, then M 0 nondeterministically decides whether to check that con guration or not. If M 0 chooses to check and the check is successful then M 0 nondeterministically chooses a number m (where 1  m  k ? 1). M 0 accepts if and only if there was at least one check on that computation path and all checks were successful. It can be easily seen that the number of accepting paths of this machine equals fP (x) f (x)  (k ? 1)i i i=1

=

fP (x) f (x)  (k ? 1)i ? 1 = kf (x) ? 1 i i=0

Now we will de ne the classes MODZ k L, which di er from MODk L by the restriction that the underlying machine is not allowed to accept on a number a of computation paths, where a > 0 and a  0 mod k:

De nition 14 Let k  2 be an integer. MODZ k L is the class of sets A, such that there is an f 2 #L with: x 2 A =) f (x) 6 0 mod k x 62 A =) f (x) = 0 11

Note that MODZ k L  MODk L \ NL. The reverse inclusion is not known. Now we de ne the class LogFewNL which we feel is the adequate logspace equivalent to the class FewP : De nition 15 A set A is in LogFewNL, if there exists a weakly unambiguous logspace machine with f (x) accepting paths on input x, such that x 2 A () f (x) > 0

Theorem 16 LogFewNL  MODZ k L for all k  2. Proof: Let A 2 LogFewNL and M a machine with f (x) accepting paths on input x, such that x 2 A i f (x) > 0. By Lemma 13 there is a logspace machine M 0 with kf (x) ? 1 accepting paths on input x, and this is not divisible by k if f (x) > 0, but zero if f (x) = 0. Thus A is in MODZ k L via machine M 0. De nition 17 A set A is in LogFew, if there exists a weakly unambiguous logspace

machine with f (x) accepting paths on input x, and a logspace computable predicate R such that x 2 A () R(x; f (x))

Theorem 18 LogFew  MODk L for all k  2. Proof: It is clear that for all a; b  2 : MODaL  MODabL. Thus we need only show that LogFew  MODk L for prime numbers k  2.

Now let A be in LogFew via machine M , and let M have f (x) accepting paths on input x. De ne A0 := (i; x) f (ix) 6 0 mod k Certainly A0 2 MODk L by Lemma 12. Now de ne A00 := f(i; x) 2 A0 j 8j > i : (j; x) 62 A0g Also A00 2 MODk L, because f (x) is polynomially bounded, say f (x)  p(jxj) for polynomial p, and we need only check if (1) (i; x) 2 A0 (2) (i + 1; x); : : :; (p(jxj); x) 62 A0 which is possible because of the closure of MODk L under complement, join, and logspace conjunctive reducibility. Now on input x do the following: Construct the series (i1; x); (i2; x); : : :; (ir ; x) with i1 < i2 < : : : < ir  p(jxj) and the property that i = ij for some j () i  p(jxj) and R(x; i) One can easily check that x 2 A () (ij ; x) 2 A00 for some j and so A 2 MODk L, because MODk L is closed under logspace disjunctive reducibility. (



!

12

)

5 Concluding Remarks

We investigated closure properties of the logspace counting class #L, and it turned out that although the properties themselves are rather similar to the polynomial time case, the techniques needed to prove them are more complicated. We view this as another hint, that the behavior of logarithmic space machines is not comparable to polynomial time machines. The results are summarized in picture 5.1. As naturally the various MODk L-classes and their relations could not be drawn completely here, we added only three of them as examples (let p be any odd prime). It should be clear how to generalize this picture to other MODk L and MODZ k L-classes. Moreover we gave a series of very natural problems from Linear Algebra that are complete in logspace-MOD-classes, thus pointing out the relevance of counting accepting computation paths of logspace machines. A di erent type of counting, namely the so called Inductive Counting of Immerman [12] and Szelepcsenyi [18] does not refer to the number of accepting paths, but to the number of reachable con gurations. We want to emphasize here that this type of counting does not help solving questions like: Is L contained in NL? In general the relationship between NL and the logspace-MOD-classes remains an open question. Moreover, it is still open, whether MODk L is closed under complement, even if k is not prime.

Picture 5.1

13

6 Acknowledgements We thank Hans-Jorg Burtschick and Klaus-Jorn Lange for fruitful discussions about the subjects of this paper. Thanks are also due to Birgit Jenner, who helped us to considerably simplify our original proof of Lemma 12 and Lemma 13. We further thank Jacobo Toran and the unknown referees for some helpful hints. The second author would like to thank Birgit Jenner, Peter Rossmanith and Chris Wilson for some insightful discussions concerning NC 1-reductions.

References [1] Eric W. Allender. The complexity of sparse sets in P. In Proc. of 1st Structure in Complexity Conf., number 223 in LNCS, pages 1{11. Springer, 1986. [2] Carme A lvarez and Birgit Jenner. A very hard log space counting class. In Proc. of 5th Conference on Structure in Complexity Theory, pages 154{168, 1990. [3] Jose L. Balcacar, Josep Daz, and Joaquim Gabarro. Structural Complexity Theory I. Springer, 1988. [4] Richard Beigel, John Gill, and Ulrich Hertrampf. Counting classes: Threshold, parity, mods, and fewness. In Proc. of 7th STACS, number 415 in LNCS, pages 49{57. Springer, 1990. [5] S.J. Berkowitz. On computing the determinant in small parallel time using a small number of processors. Information Processing Letters, 18:147{150, 1984. [6] Allan Borodin, Stephen A. Cook, Patrick W. Dymond, Walter L. Ruzzo, and Martin Tompa. Two applications of inductive counting for complementation problems. SIAM Journal on Computing, 18(3):559{578, 1989. [7] Allan Borodin, J. von zur Gathen, and John E. Hopcroft. Fast parallel matrix and gcd computations. Information and Control, 52:241{256, 1982. [8] Gerhard Buntrock, Lane A. Hemachandra, and Dirk Siefkes. Using inductive counting to simulate nondeterministic computation. In Proc. of 15th MFCS, number 452 in LNCS, pages 187{194. Springer, 1990. (to appear in Information and Computation). [9] Jin-yi Cai and Lane A. Hemachandra. On the power of parity polynomial time. In Proc. of 6th STACS, number 349 in LNCS, pages 229{239. Springer, 1989. [10] Stephen A. Cook. A taxonomy of problems with fast parallel algorithms. Information and Control, 64:2{22, 1985. [11] Thomas Gundermann, Nasser Ali Nasser, and Gerd Wechsung. A survey on counting classes. In Proc. of 5th Conference on Structure in Complexity Theory, pages 140{ 153, 1990. [12] Neil Immerman. Nondeterministic space is closed under complement. SIAM Journal on Computing, 17(5):935{938, 1988. 14

[13] Richard E. Ladner and Nancy A. Lynch. Relativization of questions about log space computability. Math. Systems Theory, 10:19{32, 1976. [14] Klaus-Jorn Lange and Peter Rossmanith. Characterizing unambiguous augmented pushdown automata by circuits. In Proc. of 15th MFCS, number 452 in LNCS, pages 399{406. Springer, 1990. [15] Christoph Meinel. Modi ed Branching Programs and Their Computational Power. LNCS. Springer, 1989. [16] Ketan Mulmuley. A fast parallel algorithm to compute the rank of a matrix over an arbitrary eld. In Proc. of 18th STOC, pages 338{339, 1986. [17] Christos H. Papadimitriou and Stathis K. Zachos. Two remarks on the power of counting. In Proc. of 6th GI Conference on Theoretical Computer Science, number 145 in LNCS, pages 269{276. Springer, 1983. [18] Robert Szelepcsenyi. The method of forced enumeration for nondeterministic automata. Acta Informatica, 26:279{284, 1988. [19] Jacobo Toran. Counting the number of solutions. In Proc. of 15th MFCS, number 452 in LNCS, pages 121{134. Springer, 1990. [20] Leslie G. Valiant. The relative complexity of checking and evaluating. Information Processing Letters, 5:20{23, 1976. [21] Leslie G. Valiant. The complexity of computing the permanent. Theoretical Computer Science, 8:189{201, 1979.

15