Professional Documents
Culture Documents
Countingcomplexity Ps
Countingcomplexity Ps
Shripad Thite
May 11, 1998
Abstra
t
The
ounting
omplexity
lasses are dened in terms of the number of a
epting
omputation paths of nondetereministi
polynomial-time Turing ma
hines. They are,
therefore, the
ounting versions of de
ision problems in NP. We review the properties
of well-known
ounting
lasses like #P, P, GapP, SPP et
. We also give an overview
of the proof of Toda's theorem that relates the
ounting
lasses to the polynomial-time
hierar
hy PH.
1 Introdu tion
The
ounting
omplexity
lasses
orrespond to
ounting the number of solutions to de
ision
problems in NP. The
ounting version of a de
ision problem requires as an answer some
fun
tion of the number of solutions to that problem.
The
ounting
lasses are interesting also be
ause they are also
losely related to proba-
bilisti
lasses like PP and BPP. A probabilisti
ma
hine a
epts depending upon whether
the majority of its
omputation paths a
ept or not. This notion of
omputation is weaker
than the
ounting version whi
h demands the exa
t number of a
epting paths.
Departmentof Computer S
ien
e, University of Illinois at Urbana-Champaign, 1304 W. Springeld
Ave., Urbana, IL 61801; Email: thiteuiu
.edu.
1
1.1 Notation
If M is a nondeterministi
polynomial-time Turing ma
hine and x is a string, then #M (x)
denotes the number of
omputation paths of the TM M on input x that end in a
epting
states. The ma
hine M is obtained from M by ex
hanging a
epting and reje
ting states.
Therefore, #M (x) denotes the number of reje
ting paths of M on input x.
The total number of
omputation paths of M on input x is #M (x) + #M (x).
The dieren
e between the number of a
epting and reje
ting paths, denoted by M (x),
is equal to #M (x) #M (x).
Unless spe
ied otherwise, a TM M is
onsidered to be in \normal form", i.e. it has at
most two nondeterministi
hoi
es in ea
h
onguration and the length of ea
h
omputation
path is equal to a xed polynomial in the length of the input. Therefore, if M is in normal
form and its exe
ution time is bounded by the polynomial p, then the total number of
omputation paths indu
ed by an input string x is equal to 2 (j j).
p x
2.1 #P
Denition 2.1 #P is the
lass of fun
tions f su
h that there exists a nondeterministi
polynomial-time Turing ma
hine M su
h that 8x 2 ; f (x) = #M (x).
An example of a #P fun
tion is #SAT whi
h
orresponds to the number of solutions
to the problem of satisability of a Boolean formula in CNF. #SAT gives the number of
distin
t assignments of truth values to the Boolean variables in the formula that
ause the
formula to evaluate to true. Here, the underlying language SAT is NP-
omplete.
Another example of a #P fun
tion is the PERMANENT of an n n integer matrix.
It was shown to be #P-
omplete in [Val79℄. PERMANENT
orresponds to
omputing
the number of perfe
t mat
hings in a bipartite graph. The underlying de
ision problem of
whether there exists a perfe
t mat
hing is known to be solvable in polynomial time.
2
2.1.1 Closure properties
Closure of #P under multipli
ation also follows from
losure under addition sin
e
multipli
ation is equivalent to repeated addition.
The
lass #P
aptures only the non-negative integer fun
tions sin
e the number of
a
epting paths of a TM
annot take on negative values. Therefore, #P is not
losed under
subtra
tion.
2.2 GapP
Denition 2.2 GapP is the
lass of fun
tions f su
h that there exists a nondeterministi
polynomial-time Turing ma
hine M su
h that 8x 2 ; f (x) = M (x).
Theorem 2.1
#P ( GapP
3
Let f 2 #P so that f (x) = #M (x). We dene a TM N that on input x simulates the
ma
hine M . N a
epts if M a
epts. On the other hand, if M reje
ts, then N bran
hes
into two
ongurations. In one, N always a
epts, while in the other, N always reje
ts.
The proper in
lusion follows from the fa
t that a GapP fun
tion
an take negative
values while a #P fun
tion
annot.
Theorem 2.2 GapP is
losed under subtra
tion. If f 2 GapP, then f 2 GapP.
The statement follows from the fa
t that M (x) = M (x).
Theorem 2.3 GapP is exa
tly the
losure of #P under subtra
tion.
If g 2 GapP, then there exists a nondeterministi
polynomial-time Turing ma
hine N
su
h that g(x) = N (x) = #N (x) #N (x). There exists fun
tions in #P
orresponding
to #N (x) and #N (x). Therefore, g is the dieren
e of two #P fun
tions.
Let f1 and f2 be fun
tions in #P su
h that f1(x) = #M1(x) and f2(x) = #M2(x).
We
onstru
t ma
hines N1 and N2 as in theorem 2.1 above su
h that N1(x) = #M1(x)
and N2(x) = #M2(x). We also
onstru
t a TM N that nondeterministi
ally de
ides to
simulate either N1 or N2. Then, N (x) = #M1(x) #M2(x).
3 Counting lasses
A few of the
omplexity
lasses that are dened in terms of
ounting fun
tions are dened
below.
4
Denition 3.1 NP
an be dened as the
lass of languages L su
h that there exists
a nondeterministi
polynomial-time Turing ma
hine M su
h that
Clearly, UP NP.
Denition 3.3 ModkP is the
lass of languages L su
h that there exists a nondeter-
ministi
polynomial-time Turing ma
hine M su
h that
8x; x 2 L , #M (x)
is odd.
In other words, P = Mod2P
Denition 3.5 FewP is the
lass of languages L su
h that there exists a nondeter-
ministi
polynomial-time Turing ma
hine M and a polynomial p su
h that
5
Clearly, FewP NP.
Denition 3.6 SPP is the
lass of all languages L su
h that 9 a nondeterministi
polynomial-time Turing ma
hine M su
h that 8x,
x2L ) M (x) = 1
x 2= L ) M (x) = 0:
4.1 PP
PP is the
lass of languages a
epted by majority, i.e.a PP-ma
hine a
epts its input i
at least half of the
omputation paths indu
ed by the input are a
epting. While a #P
fun
tion
omputes the number of solutions to a problem instan
e, a PP-ma
hine bases its
de
ision upon only the most signi
ant bit of this number.
Denition 4.1 PP is the
lass of languages L su
h that there exists a nondeterministi
polynomial-time Turing ma
hine M and a fun
tion f 2 FP su
h that
4.2 BPP
BPP is the
lass of languages a
epted by probabilisti
Turing ma
hines that have proba-
bility of error bounded by some
onstant.
Denition 4.2 BPP is the
lass of languages L su
h that there exists a nondeterministi
polynomial-time Turing ma
hine M and a
onstant > 0 su
h that
Denition 5.1 Let C be a
lass of languages. Then, the operators , BP and P applied
to the
lass C result in new
lasses dened as follows:
The operators dened above are generalizations of the well-known
lasses PP, BPP
and P. Spe
i
ally, P P = PP, BP P = BPP and P = P.
Theorem 5.1 PH PPP
The above theorem follows from the following in lusions that are proved below:
PH BP P P P P#P[1℄ PPP
Lemma 5.1 8k 1; P
k
[ BP
P
k
P
k 1
Lemma 5.2 BP P BP P
Lemmas 5.1 and 5.2
an be proved essentially using the denitions of the operators BP
and .
Lemma 5.3 BP BP P = BP P
For a BP-ma
hine, the probability of
orre
tness
an be amplied by iterating the
probabilisti
omputation. This probability ampli
ation te
hnique is dis
ussed in more
detail in [S
h89℄.
7
Theorem 5.2 PH BP P
We prove the theorem by indu
tion on the levels of PH. Note that BP P is
losed
under
omplement.
tation, we have 1 BP P.
P
k
Indu
tive step From lemma 5.1, we have BP 1. From the indu
tive
P
k
P
k
[
) PH = Pk BP P
k0
Theorem 5.3 BP P P P
This in
lusion is obvious from the denitions of the operators P and BP.
Denition 5.2 Let M be a nondeterministi
polynomial-time Turing ma
hine with input
alphabet . 8y 2 and 8i 0, we dene a fun
tion f : N ! N as follows:
f (y; 0)
M = #M (y)
fM (y; i) = 3 (f (y; i 1))4 + 4 (f (y; i 1))3
M M
Lemma 5.4
8
>< 22 k1 1forsomek1 > 0
i
if #M (y )isodd
f (y; i) = > 2
M
: 2 k2forsomek2 > 0
i
if #M (y )iseven
8
The statement
an be proved by indu
tion on i.
Lemma 5.5
Sin
e 22d
lg q (n)e
= 2 ( )+ = 2 ( ) 2 for some k 0, the result follows from lemma 5.4.
q n k q n k
#Q(y#1 ) = f (y; i)
i
M
on input y simulates the ma
hine Q of lemma 5.6 on input y#1 . It is
lear that N
N i
9
Lgk 2(p n ) 1.
From lemma 5.7, we
an
onstru
t a nondeterministi
polynomial-time
Turing ma
hine N with #N (y) as in the lemma.
Consider the nondeterministi
polynomial-time Turing ma
hine Z that on input x of
length n nondeterministi
ally
hooses a string y 2 f0; 1g ( ) and then simulates N on input
p n
Obviously, P [ Pk. Negating the answers of the ora
le, we obtain P [ Pk
P
k
P
k
P
k
P
k
using DeMorgan's law. Again, sin
e =
o , we obtain the above result. We therefore
P
k
P
k
have PPP Pk and from the main theorem PH PPP. Therefore, PH Pk.
Referen es
[All89℄ Allender, E., \A note on the power of threshold
ir
uits", IEEE FOCS, pp. 580{
584, 1989.
[BBS86℄ Bal
azar, J.L., Book, R.V., S
honing, U., \The polynomial-time hierar
hy and
sparse ora
les", J. Asso
. Comput. Ma
h., 33, pp. 603{617, 1986.
[BG92℄ Beigel, R., Gill, J., \Counting
lasses: thresholds, parity, mods, and fewnewss",
Theoret. Comput. S
i., 103, pp. 3{23, 1992.
[FFK94℄ Fenner, S.A., Fortnow, L.J., Kurtz, S.A., \Gap-denable
ounting
lasses", Jour-
nal of Computer and System S
ien
es, 48, pp. 116{148, 1994.
[HS97℄ Fortnow, L., \Counting Complexity", Hemaspaandra, L.A., Selman, A.L., (Eds.),
Complexity Theory Retrospe
tive II, Springer-Verlag, pp. 81{107, 1997.
[S
h89℄ S
honing, U., \Probabilisti
omplexity
lasses and lowness", Journal of Computer
and System S
ien
es, 39, pp. 84{100, 1989.
11
[Toda89℄ Toda, S., \On the
omputational power of PP and P", IEEE FOCS, pp. 514{
519, 1989.
[Toda91℄ Toda, S., \PP is as hard as the polynomial-time hierar
hy", SIAM Journal on
Computing, 20(5), pp. 865{877, 1991.
[Val79℄ Valiant, L., \The
omplexity of
omputing the permanent", Theoret. Comput.
S
i., 5, pp. 189{201, 1979.
12