<<

Complexity Measures and Decision Tree

Complexity A Survey

a; a;b;

Harry Buhrman Ronald de Wolf

a

CWI PO Box Amsterdam The Netherlands

fbuhrmanrdewolfgcwi

b

University of Amsterdam

Abstract

We discuss several complexity measures for Bo olean functions certicate complex

ity sensitivity blo ck sensitivity and the degree of a representing or approximating

p olynomial We survey the relations and biggest gaps known b etween these mea

sures and show how they give b ounds for the decision tree complexity of Bo olean

functions on deterministic randomized and quantum computers

Intro duction

Computational Complexity is the subeld of Theoretical Computer Science

that aims to understand how much computation is necessary and sucient

to p erform certain computational tasks For example given a computational

problem it tries to establish tight upp er and lower b ounds on the length of

the computation or on other resources like space

Unfortunately for many practically relevant computational problems no tight

b ounds are known An illustrative example is the well known P versus NP

problem for NPcomplete problems the current upp er and lower b ounds

lie exp onentially far apart That is the b est known algorithms for these com

putational problems need exp onential time in the size of the input but the

b est lower b ounds are of a linear nature

One of the general approaches towards solving a hard problem mathematical

or otherwise is to set the goals a little bit lower and try to tackle a simpler

Partially supp orted by the EU fth framework pro ject QAIP IST

Preprint submitted to Elsevier Preprint Novemb er

problem rst The hop e is that understanding of the simpler problem will lead

to a b etter understanding of the original more dicult problem

This approach has b een taken with resp ect to Computational Complexity

simpler and more limited mo dels of computation have b een studied Perhaps

the simplest mo del of computation is the decision tree The goal here is to

n

compute a Bo olean function f f g f g using queries to the input In

the most simple form a query asks for the value of the bit x and the answer is

i

this value The queries may b e more complicated In this survey we will only

deal with this simple typ e of query The algorithm is adaptive that is the k th

query may dep end on the answers of the k previous queries The algorithm

can therefore b e describ ed by a binary tree whence its name decision tree

For a Bo olean function f we dene its deterministic decision tree complexity

D f as the minimum numb er of queries that an optimal deterministic al

gorithm for f needs to make on any input This measure corresp onds to the

depth of the tree that an optimal algorithm induces Once the computational

p ower of decision trees is b etter understo o d one can extend this notion to

more p owerful mo dels of query algorithms This results in randomized and

even quantum decision trees

In order to get a handle on the computational p ower of decision trees whether

deterministic randomized or quantum other measures of the complexity of

Bo olean functions have b een dened and studied Some prime examples are

certicate complexity sensitivity block sensitivity the degree of a representing

polynomial and the degree of an approximating polynomial We survey the

known relations and biggest gaps b etween these complexity measures and show

how they apply to decision tree complexity giving pro ofs of some of the central

results The main results say that all of these complexity measures with the

p ossible exception of sensitivity are p olynomially related to each other and

to the decision tree complexities in each of the classical randomized and

quantum settings We also identify some of the main remaining op en questions

The complexity measures discussed here also have interesting relations with

circuit complexity parallel computing communication

complexity and the construction of oracles in computational complexity

theory which we will not discuss here

The pap er is organized as follows In Section we intro duce some notation

concerning Bo olean functions and multivariate p olynomials In Section we

dene the three main variants of decision trees that we discuss determin

istic decision trees randomized decision trees and quantum decision trees

In Section we intro duce certicate complexity sensitivity blo ck sensitivity

and the degree of a representing or approximating p olynomial We survey the

main relations and known upp er and lower b ounds b etween these measures

In Section we show how the complexity measures of Section imply upp er

and lower b ounds on deterministic randomized and quantum decision tree

complexity This section gives b ounds that apply to all Bo olean functions

Finally in Section we examine some sp ecial sub classes of Bo olean functions

and tighten the general b ounds of Section for those sp ecial cases

Bo olean Functions and Polynomials

Boolean functions

n

A Bo olean function is a function f f g f g Note that f is total

n

ie dened on all nbit inputs For an input x f g we use x to denote

i

its ith bit so x x x We use jxj to denote the Hamming weight of x

n

S

its numb er of s If S is a set of indices of variables then we use x to

fig

denote the input obtained by ipping the S variables in x We abbreviate x

i fg

to x For example if x then x and x We call

f symmetric if f x only dep ends on jxj Some common symmetric functions

that we will refer to are

OR x i jxj

n

AND x i jxj n

n

PARITY x i jxj is o dd

n

MAJ x i jxj n

n

We call f monotone increasing if f x cannot decrease if we set more vari

ables of x to A function that we will refer to sometimes is the address

k

function This is a function on n k variables where the rst k bits

k

of the input provide an index in the last bits The value of the indexed

variable is the output of the function Wegener gives a monotone version

of the address function

Multilinear polynomials

If S is a set of indices of variables then the monomial X is the pro duct of

S

variables X x The degree of this monomial is the cardinality of S A

S iS i

n

multilinear polynomial on n variables is a function p R C which can b e

P

c X for some complex numb ers c We call c the written as px

S S S S

S n

coecient of the monomial X in p The degree of p is the degree of its largest

S

monomial deg p maxfjS j j c g Note that if we restrict attention to

S

n k

the Bo olean domain f g then x x for all k so considering only

i

i

multilinear p olynomials is no restriction when dealing with Bo olean inputs

The next lemma implies that if multilinear p olynomials p and q are equal on

all Bo olean inputs then they are identical

n

Lemma Let p q R R be multilinear polynomials of degree at most d

n

If px q x for al x f g with jxj d then p q

Pro of Dene r x px q x Supp ose r is not identically zero Let

V b e a minimaldegree term in r with nonzero co ecient c and x b e the

input where x i x o ccurs in V Then jxj d and hence px q x

j j

However since all monomials in r except for V evaluate to on x we have

r x c px q x which is a contradiction It follows that r is

identically zero and p q 2

Below we sketch the metho d of symmetrization due to Minsky and Pap ert

n

see also Section Let p R R b e a p olynomial If is some

p ermutation and x x x then x x x Let S b e the

n n n

sy m

set of all n p ermutations The symmetrization p of p averages over all

p ermutations of the input and is dened as

P

p x

S

sy m

n

p x

n

sy m

Note that p is a p olynomial of degree at most the degree of p Symmetrizing

sy m

may actually lower the degree if p x x then p The following

lemma allows us to reduce an nvariate p olynomial to a singlevariate one

n

Lemma Minsky Pap ert If p R R is a multilinear polynomial

then there exists a singlevariate polynomial q R R of degree at most the

sy m n

degree of p such that p x q jxj for al l x f g

sy m

Pro of Let d b e the degree of p which is at most the degree of p Let V

j

n

denote the sum of all pro ducts of j dierent variables so V x x

n

j

sy m

V x x x x x x etc Since p is symmetrical it is easily

n n

shown by induction that it can b e written as

sy m

p x c c V c V c V

d d

jxj

with c R Note that V assumes value jxjjxj jxj jxj j

i j

j

j on x which is a p olynomial of degree j of jxj Therefore the singlevariate

p olynomial q dened by

jxj jxj jxj

c c q jxj c c

d

d

satises the lemma 2

Decision Tree Complexity on Various Machine Mo dels

Below we dene decision tree complexity for three dierent kinds of machine

mo dels deterministic randomized and quantum

Deterministic

A deterministic decision tree is a ro oted ordered binary tree T Each internal

no de of T is lab eled with a variable x and each leaf is lab eled with a value

i

n

or Given an input x f g the tree is evaluated as follows Start at the

ro ot If this is a leaf then stop Otherwise query the variable x that lab els

i

the ro ot If x then recursively evaluate the left subtree if x then

i i

recursively evaluate the right subtree The output of the tree is the value or

of the leaf that is reached eventually Note that an input x deterministically

determines the leaf and thus the output that the pro cedure ends in

n

We say a decision tree computes f if its output equals f x for all x f g

Clearly there are many dierent decision trees that compute the same f The

complexity of such a tree is its depth ie the numb er of queries made on the

worstcase input We dene D f the decision tree complexity of f as the

depth of an optimal minimaldepth decision tree that computes f

Randomized

As in many other mo dels of computation we can add the p ower of random

ization to decision trees There are two ways to view a randomized decision

tree Firstly we can add p ossibly biased coin ips as internal no des to the

tree That is the tree may contain internal no des lab eled by a bias p

and when the evaluation pro cedure reaches such a no de it will a coin with

bias p and will go to the left child on outcome heads and to the right child

on tails Now an input x no longer determines with certainty which leaf of

the tree will b e reached but instead induces a probability distribution over

the set of all leaves Thus the tree outputs or with a certain probability

The complexity of the tree is the numb er of queries on the worstcase input

and worstcase outcome of the coin ips A second way to dene a randomized

decision tree is as a probability distribution over deterministic decision trees

The tree is evaluated by cho osing a deterministic decisions tree according to

which is then evaluated as b efore The complexity of the randomized tree

in this second denition is the depth of the deep est T that has T It

is not hard to see that these two denitions are equivalent

We say that a randomized decision tree computes f with boundederror if

n

its output equals f x with probability at least for all x f g R f

denotes the complexity of the optimal randomized decision tree that computes

f with b ounded error

Quantum

We briey sketch the framework of quantum computing referring to for

more details The classical unit of computation is a bit which can take on

the values or In the quantum case the unit of computation is a quantum

bit or qubit which is a linear combination or superposition of the two classical

values

ji ji

More generally an mqubit state ji is a sup erp osition of all classical mbit

strings

X

ji jii

i

m

ifg

Here is a complex numb er which is called the amplitude of basis state

i

P

j j Mathematically sp eaking the set of mqubit jii We require

i

i

quantum states is the set of all unit vectors in the Hilb ert spaced that has

m

fjii j i f g g as an orthonormal basis

There are two things we can do to such a state measure it or apply a unitary

transformation to it One of the axioms of quantum mechanics says that if we

measure the mqubit register ji then we will see the basis state jii with prob

P

ability j j Since j j we thus have a valid probability distribution

i i

i

over the classical mbit strings After the measurement ji has collapsed

to the sp ecic observed basis state jii and all other information in the state

will b e lost

Apart from measuring ji we can also apply a unitary transformation to

m

m

it That is viewing the amplitudes of ji as a vector in C we can

P

jii by multiplying ji with a unitary obtain some new state j i

m

i

ifg

matrix U j i U ji A matrix U is unitary i its inverse U equals the

conjugate transp ose matrix U Because unitarity is equivalent to preserving

P

Euclidean norm the new state j i will still have j j There is an

i

i

extensive literature on how such large U can b e obtained from small unitary

transformations quantum gates on few qubits at a time see

The subscript in R f refers to the sided error of the algorithm it may

err on inputs as well as on inputs We will not discuss zeroerror Las Vegas

or onesided error randomized decision trees here See for some

results concerning such trees

n

We formalize a query to an input x f g as a unitary transformation O

which maps ji b z i to ji b x z i Here ji b z i is some mqubit basis state

i

where i takes dlog ne bits b is one bit z denotes the m dlog ne bit

workspace of the quantum computer which is not aected by the query

and denotes exclusiveor This clearly generalizes the classical setting where

a query inputs an i into a blackb ox which returns the bit x if we apply O

i

to the basis state ji z i we get ji x z i from which the ith bit of the input

i

can b e read Because O has to b e unitary we sp ecify that it maps ji z i to

ji x z i Note that a quantum computer can make queries in sup erp osition

i

P P

n n

p p

ji z i gives ji x z i which in applying O once to the state

i

i i

n n

some sense contains all bits of the input

A quantum decision tree has the following form we start with an mqubit state

ji where every bit is Then we apply a unitary transformation U to the

state then we apply a query O then another unitary transformation U etc A

T query quantum decision tree thus corresp onds to a big unitary transforma

tion A U OU O U OU Here the U are xed unitary transformations

T T i

indep endent of the input x The nal state Aji dep ends on the input x only

via the T applications of O The output is obtained by measuring the nal

state and outputting the rightmost bit of the observed basis state without

loss of generality we can assume there are no intermediate measurements

We say that a quantum decision tree computes f exactly if the output equals

n

f x with probability for all x f g The tree computes f with bounded

n

error if the output equals f x with probability at least for all x f g

Q f denotes the numb er of queries of an optimal quantum decision tree that

E

computes f exactly Q f is the numb er of queries of an optimal quantum

decision tree that computes f with b oundederror Note that we just count

the numb er of queries not the complexity of the U

i

Unlike the classical deterministic or randomized decision trees the quantum

algorithms are not really trees anymore the names quantum query algo

rithm or quantum blackb ox algorithm are also in use Nevertheless we

prefer the term quantum decision tree b ecause such quantum algorithms

generalize classical trees in the sense that they can simulate them as sketched

b elow Consider a T query deterministic decision tree It rst determines which

variable it will query initially then it determines the next query dep ending

up on its history and so on for T queries Eventually it outputs an outputbit

dep ending on its total history The basis states of the corresp onding quan

tum algorithm have the form ji b h ai where i b is the querypart h ranges

over all p ossible histories of the classical computation this history includes

all previous queries and their answers and a is the rightmost qubit which

will eventually contain the output Let U map the initial state j i to

ji i where x is the rst variable that the classical tree would query Now

i

the quantum algorithm applies O which turns the state into ji x i Then

i

the algorithm applies a transformation U which maps ji x i to jj h i

i

where h is the new history which includes i and x and x is the variable that

i j

the classical tree would query given the outcome of the previous query Then

the quantum tree applies O for the second time it applies a transformation

U which up dates the workspace and determines the next query etc Finally

after T queries the quantum tree sets the answer bit to or dep ending on

its total history All op erations U p erformed here are injective mappings from

i

basis states to basis states hence they can b e extended to p ermutations of

basis states which are unitary transformations Thus a T query determinis

tic decision tree can b e simulated by an exact T query quantum algorithm

Similarly a T query randomized decision tree can b e simulated by a T query

quantum decision tree with the same error probability basically b ecause a su

p erp osition can simulate a probability distribution Accordingly we have

Q f R f D f n and Q f Q f D f n for all f

E

Some Complexity Measures

n

Let f f g f g b e a Bo olean function We can asso ciate several

measures of complexity with such functions whose denitions and relations

are surveyed b elow

Certicate complexity

Certicate complexity measures how many of the n variables have to b e given

a value in order to x the value of f

Denition Let C be an assignment C S f g of values to some subset

n

S of the n variables We say that C is consistent with x f g if x C i

i

for al l i S

For b f g a bcerticate for f is an assignment C such that f x b

whenever x is consistent with C The size of C is jS j the cardinality of S

The certicate complexity C f of f on x is the size of a smal lest f x

x

certicate that is consistent with x The certicate complexity of f is C f

max C f The certicate complexity of f is C f max C f

x x x

fxjf xg

and similarly we dene C f

For example C OR since it suces to set one variable x to force

n i

the ORfunction to On the other hand C ORn C OR n

n

Sensitivity and block sensitivity

Sensitivity and blo ck sensitivity measure how sensitive the value of f is to

changes in the input Sensitivity was intro duced in under the name of

critical complexity and blo ck sensitivity in

Denition The sensitivity s f of f on x is the number of variables x for

x i

i

which f x f x The sensitivity of f is sf max s f

x x

The blo ck sensitivity bs f of f on x is the maximum number b such that there

x

B

i

are disjoint sets B B for which f x f x The blo ck sensitivity of

b

f is bsf max bs f If f is constant we dene sf bsf

x x

Note that sensitivity is just blo ck sensitivity with the size of the blo cks B

i

restricted to Simon gave a general lower b ound on sf

Theorem Simon If f depends on al l n variables then we have sf

log n log log n

Wegener proved that this theorem is tight up to the O log log nterm for

the monotone address function

We now prove some relations b etween C f sf and bsf Clearly for all x

we have s f bs f and bs f C f since a certicate for x will have

x x x x

to contain at least one variable of each sensitive blo ck Hence

Prop osition sf bsf C f

The biggest gap known b etween sf and bsf is quadratic and was exhibited

by Rubinstein

p p

Example Let n k Divide the n variables in n disjoint blocks of n

p

the second block B contains variables the rst block B contains x x

n

p p

x x etc Dene f such that f x i there is at least one

n n

p

block B where two consecutive variables have value and the other n

i

p

variables are It is easy to see that sf n and bsf n so we have

a quadratic gap between sf and bsf Since bsf C f this is also a

quadratic gap between sf and C f Wegener and Zadori give a dierent

function with a smal ler gap between sf and C f

It has b een op en for quite a while whether bsf can b e upp er b ounded by a

p olynomial in sf It may well b e true that bsf O sf

There has also b een some work on average blo ck sensitivity and its appli

cations In particular Shi has shown that the average sensitivity of a

g

total function f is a lower b ound on its approximate degree deg f

k

Op en problem Is bsf O sf for some k

We pro ceed to give Nisans pro of that C f is b ounded by bsf

Lemma If B is a minimal sensitive block for x then jB j sf

B

Pro of If we ip one of the B variables in x then the function value must ip

B

from f x to f x otherwise B would not b e minimal so every B variable

B

is sensitive for f on input x Hence jB j s B f sf 2

x

Theorem Nisan C f sf bsf

n

Pro of Consider an input x f g and let B B b e disjoint minimal

b

sets of variables that achieve the blo ck sensitivity b bs f bsf We

x

will show that C B f g which sets variables according to x is a

i i

suciently small certicate for f x

If C is not an f xcerticate then let x b e an input that is consistent with

B

b+1

C such that f x f x Dene B by x x Now f is sensitive to

b

B on x and B is disjoint from B B which contradicts b bs f

b b b x

Hence C is an f xcerticate By the previous lemma we have jB j sf

i

for all i hence the size of this certicate is j B j sf bsf 2

i i

No quadratic gap b etween bsf and C f seems to b e known Some sub

quadratic gaps may b e found in Section

Degree of representing polynomial

n

Denition A polynomial p R R represents f if px f x for al l

n

x f g

Note that since x x for x f g we can restrict attention to multilinear

polynomials for representing f It is easy to see that each f can b e represented

by a multilinear p olynomial p Lemma implies that this p olynomial is unique

which allows us to dene

Denition The degree deg f of f is the degree of the multilinear polyno

mial that represents f

For example deg AND n b ecause the representing p olynomial is the

n

monomial x x The degree deg f may b e signicantly larger than sf

n

bsf and C f

Example Let f on n k variables be the AND of k ORs of k variables

each Both AND and OR are represented by degreek polynomials so the rep

k k

resenting polynomial of f has degree deg f k n On the other hand it is

p

not hard to see that sf bsf C f n Thus deg f is quadratical ly

larger than sf bsf and C f in this case

On the other hand deg f may also b e signicantly smaller than sf and

bsf as the next example from Nisan and Szegedy shows

Example Consider the function E dened by E x x x i jxj

f g This function is represented by the fol lowing degree polynomial

E x x x x x x x x x x x x

k k

Dene E as the function on n variables obtained by building a com

k

plete recursive ternary tree of depth k where the leaves are the variables

and each node is the E function of its three children For k the rep

k

resenting polynomial for E is obtained by substituting independent copies

k

of the E polynomial in the above polynomial for E This shows that

k log

deg f n On the other hand it is easy to see that ipping

any variable in the input ips the function value from to hence sf

log

bsf C f n deg f Kushilevitz has found a slightly bigger gap

based on the same technique with a slightly more complex polynomial see

footnote on p

Below we give Nisan and Szegedys pro of that deg f can b e no more than

quadratically smaller than bsf This shows that the gap of the last

example is close to optimal The pro of uses the following theorem from

Theorem Ehlich Zeller Rivlin Cheney Let p R R be a

polynomial such that b pi b for every integer i n and its deriva

q

tive has jp xj c for some real x n Then deg p cnc b b

Theorem Nisan Szegedy bsf deg f

Pro of Let p olynomial p of degree d represent f Let b bsf and a and

B B b e the input and sets which achieve the blo ck sensitivity We as

b

sume without loss of generality that f a We transform px x

N

into a p olynomial q y y by replacing every x in p as follows

b j

x y if a and j B

j i j i

It will follow from Theorem and Corollary that deg f C f so this

quadratic gap b etween deg f and C f is optimal Theorem and Corollary

will imply deg f bsf but the quadratic gap b etween deg f and bsf of this

example is the b est we know of

x y if a and j B

j i j i

x a if j B for every i

j j i

Now it is easy to see that q has the following prop erties

q is a multilinear p olynomial of degree d

b

q y f g for all y f g

q px f x

B B b

i i

q e px f x for all unit vectors e f g

i i

Let r b e the singlevariate p olynomial of degree d obtained from symmetriz

b

ing q over f g Note that r i for every integer i b and for

some x we have r x b ecause r and r Applying

q

Theorem we get d b 2

The following two theorems give resp ectively a weak b ound for all functions

and a strong b ound for almost all functions We state the rst without pro of

see

Theorem Nisan Szegedy If f depends on al l n variables then we

have deg f log n O log log n

k

The address function on n k variables has deg f k which shows

that the previous theorem is tight up to the O log log nterm

ev en

For the second result dene X fx j jxj is even and f x g similarly

P

odd ev en odd

c X b e the unique p olynomial for X Let X X X Let p

S S

S

representing f with c the co ecient of the monomial X x The

S S iS i

Mo ebius inversion formula see says

X

jS jjT j

c f T

S

T S

where f T is the value of f on the input where exactly the variables in T

are We learned ab out the next lemma via p ersonal communication with

Yaoyun Shi

ev en odd

Lemma Shi Yao deg f n i jX j jX j

Pro of Applying the Mo ebius formula with S f ng we get

X X

ev en odd jS jjT j n jxj n

c jX j jX j f T

S

T S xX

1

Since deg f n i the monomial x x has nonzero co ecient the lemma

n

follows 2

As a consequence we can exactly count the numb er of functions that have

less than full degree

n

for Theorem The number of total f that have deg f n equals

n1

n

odd n and for even n

n1 n21

ev en odd

Pro of We will count the numb er E of f for which jX j jX j by

Lemma these are exactly the f with deg f n If n is o dd then there

n n

are inputs x with jxj even and x with jxj o dd Supp ose we want to

n1

ways to do this assign f value to exactly i of the even x There are

i

n1

ev en odd

ways to cho ose the If we want jX j jX j then there are only

i

f values of the o dd x Hence

n1

n n n

X

E

n

i i

i

The second equality is Vandermondes convolution p For even n the

pro of is analogous but slightly more complicated 2

p

n

n n

n

Note that by Stirlings formula Since there are

n1

Bo olean functions on n variables we see that the fraction of functions with

degree n is o Thus almost all functions have full degree

Degree of approximating polynomial

Apart from representing a function f exactly by means of a p olynomial we

may also only approximate it with a p olynomial which can sometimes b e of

a smaller degree

n

Denition A polynomial p R R approximates f if jpx f xj

n

g

for al l x f g The approximate degree deg f of f is the minimum degree

among al l multilinear polynomials that approximate f

g

x x approximates OR so deg OR In As a simple example

contrast deg OR Note that there may b e many dierent minimal

degree p olynomials that approximate f whereas there is only one p olynomial

that represents f

Also nondeterministic p olynomials for f have b een studied but we will not

cover that notion in this survey

By the same technique as Theorem Nisan and Szegedy showed

g

Theorem Nisan Szegedy bsf deg f

The approximate degree of f can sometimes b e signicantly smaller than the

p

degree of f Nisan and Szegedy constructed a degreeO n p olynomial

which approximates OR Since bsOR n the previous theorem implies

n n

that this degree is optimal Since deg OR n we have a quadratic gap

n

g

b etween deg f and deg f This is the biggest gap known

Ambainis showed that almost all functions have high approximate degree

p

g

n log n Theorem Ambainis Almost al l f have deg f n O

Application to Decision Tree Complexity

The complexity measures discussed ab ove are intimately related to the decision

tree complexity of f in various mo dels In fact D f R f Q f Q f

E

g

bsf C f deg f and deg f are all p olynomially related

Deterministic

We start with two simple lower b ounds on D f

Theorem bsf D f

Pro of On input x with disjoint sensitive blo cks B B a deterministic

bsf

decision tree must query at least one variable in each blo ck B for otherwise we

i

could ip that blo ck and hence the correct output without the tree noticing

it Thus the tree must make at least bsf queries on input x 2

Theorem deg f D f

Pro of Consider a decision tree for f of depth D f Let L b e a leaf ie a

leaf with output and x x b e the queries on the path to L with values

r

b b Dene the p olynomial p x x x Then p has

r L ib i ib i L

i i

degree r D f Furthermore p x if leaf L is reached on input x and

L

P

p b e the sum of all p over all leaves p x otherwise Let p

L L L

L

Then p has degree D f and px i a leaf is reached on input x so

p represents f 2

Below we give some upp er b ounds on D f in terms of bsf C f deg f

g

and deg f Beals etal prove

Theorem D f C f bsf

Pro of The following describ es an algorithm to compute f x querying at

most C f bsf variables of x in the algorithm by a consistent certicate

C or input y at some p oint we mean a C or y that agrees with the values of

all variables queried up to that p oint

Rep eat the following at most bsf times

Pick a consistent certicate C and query those of its variables whose

xvalues are still unknown if there is no such C then return and

stop if the queried values agree with C then return and stop

n

Pick a consistent y f g and return f y

The nondeterministic pick a C and pick a y can easily b e made determin

istic by cho osing the rst C resp y in some xed order Call this algorithm A

Since A runs for at most bsf stages and each stage queries at most C f

variables A queries at most C f bsf variables

It remains to show that A always returns the right answer If it returns an

answer in step this is either b ecause there are no consistent certicates

left and hence f x must b e or b ecause x is found to agree with a particular

certicate C In b oth cases A gives the right answer

Now consider the case where A returns an answer in step We will show

that all consistent y must have the same f value Supp ose not Then there

are consistent y y with f y and f y A has queried b bsf

certicates C C C Furthermore y contains a consistent certicate

b

C We will derive from these C disjoint sets B such that f is sensitive

b i i

to each B on y For every i b dene B as the set of variables

i i

on which y and C disagree Clearly each B is nonempty for otherwise the

i i

B

i

agrees with C so pro cedure would have returned in step Note that y

i

B

i

which shows that f is sensitive to each B on y Supp ose variable f y

i

k o ccurs in some B i b then x y C k If j i then C has

i k k i j

b een chosen consistent with all variables queried up to that p oint including

x so we cannot have x y C k This shows that k B hence all

k k k j j

B and B are disjoint But then f is sensitive to bsf disjoint sets on y

i j

which is a contradiction Accordingly all consistent y in step must have the

same f value and A returns the right value f y f x in step b ecause x

is one of those consistent y 2

Combining with C C f sf bsf Theorem we obtain

Corollary D f sf bsf bsf

It might b e p ossible to improve this to D f bsf This would b e optimal

p

since the function f of Example has bsf n and D f n

Op en problem Is D f O bsf

Of course Theorem also holds with C instead of C Since bsf

maxfC f C f g we also obtain the following result due to

Corollary D f C f C f

g

Now we will show that D f is upp er b ounded by deg f and deg f The

rst result is due to Nisan and Smolensky b elow we give their previously

unpublished pro of It improves the earlier result D f O deg f of Nisan

and Szegedy Here a maxonomial of f is a monomial with maximal degree

in f s representing p olynomial p

Lemma Nisan Smolensky For every maxonomial M of f there is

B

a set B of variables in M such that f f

Pro of Obtain a restricted function g from f by setting all variables outside

of M to This g cannot b e constant or b ecause its unique p olynomial

representation as obtained from p contains M Thus there is some subset B

B B

of the variables in M which makes g g and hence f f 2

Lemma Nisan Smolensky There exists a set of deg f bsf vari

ables that intersects each maxonomial of f

Pro of Greedily take all variables in maxonomials of f as long as there is

a maxonomial that is still disjoint from those taken so far Since each such

maxonomial will contain a sensitive blo ck for and there can b e at most

bsf disjoint sensitive blo cks this pro cedure can go on for at most bsf

maxonomials Since each maxonomial contains deg f variables the lemma

follows 2

Theorem Nisan Smolensky D f deg f bsf deg f

Pro of By the previous lemma there is a set of deg f bsf variables that

intersects each maxonomial of f Query all these variables This induces a

restriction g of f on the remaining variables such that deg g deg f b e

cause the degree of each maxonomial in the representation of f drops at least

one and bsg bsf Rep eating this inductively for at most deg f times

we reach a constant function and learn the value of f This algorithm uses at

most deg f bsf queries hence D f deg f bsf Theorem gives the

second inequality of the theorem 2

Combining Corollary and Theorem we obtain the following result from

g

improving the earlier D f O deg f result of Nisan and Szegedy

g

Theorem D f O deg f

Finally since deg f may b e p olynomially larger or smaller than bsf the

following theorem may b e weaker or stronger than Theorem The pro of

uses an idea similar to the ab ove NisanSmolensky pro of

Theorem D f C f deg f

Pro of Let p b e the representing p olynomial for f Cho ose some certicate C

S f g of size C f If we ll in the S variables according to C then p

must reduce to a constant function constant if C is a certicate constant

if C is a certicate Hence the certicate has to intersect each maxonomial

of p Accordingly querying all variables in S reduces the p olynomial degree

of the function by at least Rep eating this deg f times we end up with a

constant function and hence know f x In all this algorithm takes at most

C f deg f queries 2

Randomized

g

Here we show that D f R f bsf and deg f are all p olynomially related

We rst give the b oundederror analogues of Theorems and

g

Theorem deg f R f

Pro of Consider a randomized decision tree for f of depth R f viewed as a

probability distribution over dierent deterministic decision trees T each of

depth at most R f Using the technique of Theorem we can write each

of those T as a valued p olynomial p of degree at most R f Dene

T

P

T p which has degree at most R f Then it is easy to see that p

T

T

p gives the acceptance probability of R so p approximates f 2

Nisan proved

Theorem Nisan bsf R f

Pro of Consider an algorithm with R f queries and an input x which

S

achieves the blo ck sensitivity For every set S such that f x f x the

probability that the algorithm queries a variable in S must b e otherwise

S

the algorithm could not see the dierence b etween x and x with sucient

probability Hence on input x the algorithm has to make an exp ected numb er

of at least queries in each of the bsf sensitive blo cks so the total exp ected

numb er of queries on input x must b e at least bsf Since the worstcase

numb er of queries on input x is at the least the exp ected numb er of queries

on x the theorem follows 2

Combined with Corollary we see that the gap b etween D f and R f can

b e at most cubic

Corollary Nisan D f R f

There may b e some ro om for improvement here b ecause the biggest gap known

b etween D f and R f is much less than cubic

k

Example Let f on n variables be the complete binary ANDORtree

of depth k For instance for k we have f x x x x x It is

easy to see that deg f n and hence D f n There is a simple randomized

algorithm for f randomly choose one of the two subtrees of the root

and recursively compute the value of that subtree if its value is then output

otherwise compute the other subtree and output its value It can be shown that

this algorithm always gives the correct answer with expected number of queries

p

O n where log Saks and Wigderson

showed that this is asymptotical ly optimal for zeroerror algorithms for this

function and Santha proved the same for boundederror algorithms Thus

we have D f n R f

Op en problem What is the biggest gap between D f and R f

Quantum

g

As in the classical case deg f and deg f give lower b ounds on quantum

query complexity The next lemma from is also implicit in the combination

of some pro ofs in

Lemma Let A be a quantum decision tree that makes T queries Then there

exist complexvalued nvariate multilinear polynomials of degree at most T

i

such that the nal state of A is

X

xjii

i

m

ifg

n

for every input x f g

Pro of Let j i b e the state of quantum decision tree on input x just b efore

k

the k th query Note that j i U O j i The amplitudes in j i dep end

k k k

on the initial state and on U but not on x so they are p olynomials of x of

degree A query maps basis state ji b z i to ji b x z i so if the amplitude

i

of ji z i in j i is and the amplitude of ji z i is then the amplitude of

ji z i after the query b ecomes x x and the amplitude of ji z i

i i

b ecomes x x which are p olynomials of degree In general

i i

if the amplitudes b efore a query are p olynomials of degree j then the

amplitudes after the query will b e p olynomials of degree j Between

the rst and the second query lies the unitary transformation U However the

amplitudes after applying U are just linear combinations of the amplitudes

b efore applying U so the amplitudes in j i are p olynomials of degree at most

Continuing inductively the amplitudes of the nal state are found to b e

p olynomials of degree at most T We can make these p olynomials multilinear

n m

without aecting their values on x f g by replacing all x by x 2

i

i

Theorem deg f Q f

E

Pro of Consider an exact quantum algorithm for f with Q f queries Let

E

S b e the set of basis states corresp onding to a output Then the acceptance

P

j xj By the previous lemma the are p oly probability is P x

k k

k S

nomials of degree Q f so P x is a p olynomial of degree Q f But

E E

P represents f so it has degree deg f and hence deg f Q f 2

E

By a similar pro of

g

Theorem deg f Q f

g

Both theorems are tight for f PARITY here we have deg f deg f

n

n and Q f Q f dne No f is known with Q f deg f

E E

g

or Q f deg f so the following question presents itself

g

Op en problem Are Q f O deg f and Q f O deg f

E

Note that the degree lower b ounds of Theorems and now imply strong

lower b ounds on the quantum decision tree complexities of almost all f In

p

particular Theorem implies that Q f n O n log n for almost all

p

f In contrast Van Dam has shown that Q f n n for al l f

Combining Theorems and with Theorems and we obtain the

p olynomial relations b etween classical and quantum complexities of

Corollary D f O Q f and D f O Q f

E

Some other quantum lower b ounds via degree lower b ounds may b e found

in

The biggest gap that is known b etween D f and Q f is only a factor of

E

D PARITY n and Q PARITY dne The biggest gap we know

n E n

p

b etween D f and Q f is quadratic D OR n and Q OR n by

n n

Grovers quantum search algorithm Also R OR n deg OR

n n

p

g

n n deg OR

n

Op en problem What are the biggest gaps between the classical D f R f

and their quantum analogues Q f Q f

E

k

The previous two op en problems are connected via the function f E on

k log

n variables Example this has D f sf n but deg f n

log

The complexity Q f is unknown it must lie b etween n and n How

E

ever it must either show a gap b etween D f and Q f partly answering

E

the last question or b etween deg f and Q f answering the p enultimate

E

question

Some Sp ecial Classes of Functions

Here we lo ok more closely at several sp ecial classes of Bo olean functions

Symmetric functions

Recall that a function is symmetric if f x only dep ends on the Hamming

weight jxj of its input so p ermuting the input do es not change the value of the

function A symmetric f is fully describ ed by giving a vector f f f

n

n

f g where f is the value of f x for jxj k Because of this and

k

Lemma there is a close relationship b etween p olynomials that represent

symmetric functions and singlevariate p olynomials that assume values or

on f ng Using this relationship von zur Gathen and Ro che prove

deg f on for all symmetric f

Theorem von zur Gathen Ro che If f is nonconstant and sym

metric then deg f n O n If furthermore n is prime then

deg f n

In fact von zur Gathen and Ro che conjecture that deg f n O for all

symmetric f The biggest gap they found is deg f n for some sp ecic

f and n Via Theorems and the ab ove degree lower b ounds give strong

lower b ounds on D f and Q f

E

For the case of approximate degrees of symmetric f Paturi gave the

following tight characterization Dene f minfjk n j f f g

k k

Informally this quantity measures the length of the interval around Hamming

weight n where f is constant

k

g

Theorem Paturi If f is nonconstant and symmetric then deg f

q

nn f

Paturis result implies lower b ounds on R f and Q f For Q f these

b ounds are in fact tight a matching upp er b ound was shown in but for

R f a stronger b ound can b e obtained from Theorem and the following

result

Prop osition Turan If f is nonconstant and symmetric then sf

n

d e

Pro of Let k b e such that f f and jxj k Without loss of generality

k k

assume k bn c otherwise give the same argument with s and s

reversed Note that ipping any of the n k variables in x ips the function

value Hence sf s f n k dn e 2

x

This lemma is tight since sMAJ dn e

n

Collecting the previous results we have tight characterizations of the various

decision tree complexities of all symmetric f

Theorem If f is nonconstant and symmetric then

D f on

R f n

Q f n

E

q

Q f nn f

Monotone functions

One nice prop erty of monotone functions was shown in

Prop osition Nisan If f is monotone then C f sf bsf

Pro of Since sf bsf C f for all f we only have to prove C f

sf Let C S f g b e a minimal certicate for some x with jS j C f

Without loss of generality we assume f x For each i S it must

i

hold that x and f x for otherwise i could b e dropp ed from the

i

certicate contradicting minimality Thus each variable in S is sensitive in x

hence C f s f sf 2

x

Theorem now implies

Corollary If f is monotone then D f sf

This corollary is exactly tight since the function f of Example has D f n

p

and sf n and is monotone

Also the lower b ound of Theorem can b e improved to

Prop osition If f is monotone then sf deg f

Pro of Let x b e an input on which the sensitivity of f equals sf Assume

without loss of generality that f x All sensitive variables must b e in

x and setting one or more of them to changes the value of f from to

Hence by xing all variables in x except for the sf sensitive variables we

obtain the OR function on sf variables which has degree sf Therefore

deg f must b e at least sf 2

The ab ove two results strengthen some of the previous b ounds for monotone

functions

Corollary If f is monotone then D f O R f D f O Q f

E

and D f O Q f

For the sp ecial case where f is b oth monotone and symmetric we have

Prop osition If f is nonconstant symmetric and monotone then deg f

n

Pro of Note that f is simply a threshold function f x i jxj t for some

t Let p R R b e the nonconstant singlevariate p olynomial obtained from

symmetrizing f This has degree deg f n and pi for i f t

g pi for i ft ng Then the derivative p must have zero es in each

of the n intervals t t t t n n

Hence p has degree at least n which implies that p has degree n and

deg f n 2

Monotone graph properties

An interesting and well studied sub class of the monotone functions are the

monotone graph properties Consider an undirected graph on n vertices There

n

are N p ossible edges each of which may b e present or absent so we

can pair up the set of all graphs with the set of all N bit strings A graph

property P is a set of graphs which is closed under p ermutation of the edges

so isomorphic graphs have the same prop erties The prop erty is monotone

if it is closed under the addition of an edge We are now interested in the

question At how many edges must we lo ok in order to determine if a graph

has the prop erty P This is just the decisiontree complexity of P if we view

P as a total Bo olean function on N bits

A prop erty P is called evasive if D P N so if we have to lo ok at all

edges in the worst case The evasiveness conjecture also sometimes called

AanderaaKarpRosenb erg conjecture says that all nonconstant monotone

graph prop erties P are evasive This conjecture is still op en see for an

overview The conjecture has b een proved for graphs where the numb er of

vertices is a prime p ower but the b est known general b ound is D P

N This b ound also follows from a degreeb ound by Do dis and

Khanna Theorem

Theorem Do dis Khanna If P is a nonconstant monotone graph

property then deg P N

Corollary If P is a nonconstant monotone graph property then D P

N and Q P N

E

Thus the evasiveness conjecture holds up to a constant factor for b oth de

terministic classical and exact quantum algorithms D P N may actually

hold for all monotone graph prop erties P but exhibit a monotone P with

Q P N Only much weaker lower b ounds are known for the b oundederror

E

complexity of such prop erties

Op en problem Are D P N and R P N for al l nonconstant

monotone graph properties P

There is no P known with R P oN but the ORproblem can trivially

b e turned into a monotone graph prop erty P with Q P oN in fact

Q P n

Finally we mention a result ab out sensitivity from

Theorem Wegener sP n for al l nonconstant monotone graph

properties P

This theorem is tight as witnessed by the prop erty No vertex is isolated

Acknow ledgments

We thank Noam Nisan for p ermitting us to include his and Roman Smolenskys

pro of of Theorem and an anonymous referee for some useful comments

which improved the presentation of the pap er

References

A Ambainis A note on quantum blackb ox complexity of almost all

Bo olean functions Information Processing Letters Also at

httparxivorgabsquantph

A Ambainis and R de Wolf Averagecase quantum query complexity In

Proceedings of th Annual Symposium on Theoretical Aspects of Computer

Science STACS volume of Lecture Notes in Computer Science

pages Springer quant

R Beals H Buhrman R Cleve M Mosca and R de Wolf Quantum lower

b ounds by p olynomials In Proceedings of th FOCS pages

quantph

R Beigel The p olynomial metho d in circuit complexity In Proceedings of the

th IEEE Structure in Complexity Theory Conference pages

A Bernasconi Sensitivity vs blo ck sensitivity an averagecase study

Information Processing Letters

M Blum and R Impagliazzo Generic oracles and oracle classes extended

abstract In Proceedings of th FOCS pages

R B Boppana The average sensitivity of b oundeddepth circuits Information

Processing Letters

H Buhrman R Cleve R de Wolf and Ch Zalka Bounds for smallerror and

zeroerror quantum algorithms In Proceedings of th FOCS pages

csCC

H Buhrman and R de Wolf Communication complexity lower b ounds by

p olynomials csCC

S Co ok C Dwork and R Reischuk Upp er and lower time b ounds for

parallel random access machines without simultaneous writes SIAM Journal

on Computing

Y Do dis and S Khanna Spacetime tradeos for graph prop erties In

Proceedings of th ICALP pages

H Ehlich and K Zeller Schwankung von Polynomen zwischen Gitterpunkten

Mathematische Zeitschrift

E Farhi J Goldstone S Gutmann and M Sipser A limit on the sp eed of

quantum computation in determining parity Physical Review Letters

quantph

E Farhi J Goldstone S Gutmann and M Sipser How many functions can

b e distinguished with k quantum queries quantph Jan

S Fenner L Fortnow S Kurtz and L Li An oracle builders to olkit In

Proceedings of the th IEEE Structure in Complexity Theory Conference pages

L Fortnow and J Rogers Complexity limitations on quantum computation

Journal of Computer and Systems Sciences Earlier version

in Complexity csCC

J von zur Gathen and J R Ro che Polynomials with two values

Combinatorica

R L Graham D E Knuth and O Patashnik Concrete Mathematics A

Foundation for Computer Science AddisonWesley

L K Grover A fast quantum mechanical algorithm for database search In

Proceedings of th STOC pages quantph

P Ha jnal An n lower b ound on the randomized complexity of graph

prop erties Combinatorica Earlier version in Structures

J Hartmanis and LA Hemachandra Oneway functions robustness and the

nonisomorphism of NPcomplete sets In Proceedings of the nd IEEE Structure

in Complexity Theory Conference pages

R Heiman I Newman and A Wigderson On readonce threshold formulae

and their randomized decision tree complexity Theoretical Computer Science

Earlier version in Structures

R Heiman and A Wigderson Randomized vs deterministic decision tree

complexity for readonce Bo olean functions Computational Complexity

Earlier version in Structures

J Kahn G Kalai and N Linial The inuence of variables on Bo olean

functions In Proceedings of th FOCS pages

J Kahn M Saks and D Sturtevant A top ological approach to evasiveness

Combinatorica Earlier version in FOCS

V King Lower b ounds on the complexity of graph prop erties In Proceedings

of th STOC pages

L Lovasz and N Young Lecture notes on evasiveness of graph

prop erties Technical rep ort Princeton University Available at

httpwwwunipaderborndefachbereichAGagmadhWWWenglishscriptshtml

M Minsky and S Pap ert Perceptrons MIT Press Cambridge MA

Second expanded edition

A Nayak and F Wu The quantum query complexity of approximating the

median and related statistics In Proceedings of st STOC pages

quantph

M A Nielsen and I L Chuang Quantum Computation and Quantum

Information Cambridge University Press

N Nisan CREW PRAMs and decision trees SIAM Journal on Computing

Earlier version in STOC

N Nisan and M Szegedy On the degree of Bo olean functions as real

p olynomials Computational Complexity Earlier version

in STOC

N Nisan and A Wigderson On rank vs communication complexity

Combinatorica Earlier version in FOCS

R Paturi On the degree of p olynomials that approximate symmetric Bo olean

functions preliminary version In Proceedings of th STOC pages

R Rivest and S Vuillemin On recognizing graph prop erties from adjacency

matrices Theoretical Computer Science

T J Rivlin and E W Cheney A comparison of uniform approximations on

an interval and a nite subset thereof SIAM Journal on Numerical Analysis

D Rubinstein Sensitivity vs blo ck sensitivity of Bo olean functions

Combinatorica

M Saks and A Wigderson Probabilistic Bo olean decision trees and the

complexity of evaluating game trees In Proceedings of th FOCS pages

M Santha On the Monte Carlo decision tree complexity of readonce formulae

In Proceedings of the th IEEE Structure in Complexity Theory Conference

pages

Y Shi Lower b ounds of quantum blackb ox complexity and degree of

approximating p olynomials by inuence of Bo olean variables Information

Processing Letters quantph

H U Simon A tight log log nb ound on the time for parallel RAMs to

compute nondegenerate Bo olean functions In Symposium on Foundations of

Computation Theory volume of Lecture Notes in Computer Science pages

Springer

M Snir Lower b ounds for probabilistic linear decision trees Theoretical

Computer Science

A A

G Tardos Query complexity or why is it dicult to separate NP coN P

A

from P by random oracles A Combinatorica

G Turan The critical complexity of graph prop erties Information Processing

Letters

W van Dam Quantum oracle interrogation Getting all information for almost

half the price In Proceedings of th FOCS pages quant

ph

I Wegener The critical complexity of all monotone Bo olean functions and

monotone graph prop erties Information and Control

I Wegener The Complexity of Boolean Functions WileyTeubner Series in

Computer Science

I Wegener and L Zadori A note on the relations b etween critical and

sensitive complexity Journal of Information Processing and Cybernetics EIK

R de Wolf Characterization of nondeterministic quantum query and quantum

communication complexity In Proceedings of th IEEE Conference on

Computational Complexity pages csCC