Decision tree model explained

In computational complexity the decision tree model is the model of computation in which an algorithm is considered to be basically a decision tree, i.e., a sequence of queries or tests that are done adaptively, so the outcome of previous tests can influence the tests performed next.

Typically, these tests have a small number of outcomes (such as a yes–no question) and can be performed quickly (say, with unit computational cost), so the worst-case time complexity of an algorithm in the decision tree model corresponds to the depth of the corresponding decision tree. This notion of computational complexity of a problem or an algorithm in the decision tree model is called its decision tree complexity or query complexity.

Decision trees models are instrumental in establishing lower bounds for complexity theory for certain classes of computational problems and algorithms. Several variants of decision tree models have been introduced, depending on the computational model and type of query algorithms are allowed to perform.

For example, a decision tree argument is used to show that a comparison sort of

n

items must take

nlog(n)

comparisons. For comparison sorts, a query is a comparison of two items

a,b

, with two outcomes (assuming no items are equal): either

a<b

or

a>b

. Comparison sorts can be expressed as a decision tree in this model, since such sorting algorithms only perform these types of queries.

Comparison trees and lower bounds for sorting

Decision trees are often employed to understand algorithms for sorting and other similar problems; this was first done by Ford and Johnson.[1]

For example, many sorting algorithms are comparison sorts, which means that they only gain information about an input sequence

x1,x2,\ldots,xn

via local comparisons: testing whether

xi<xj

,

xi=xj

, or

xi>xj

. Assuming that the items to be sorted are all distinct and comparable, this can be rephrased as a yes-or-no question: is

xi>xj

?

\pi

that describes how the input sequence was scrambled from the fully ordered list of items. (The inverse of this permutation,

\pi-1

, re-orders the input sequence.)

One can show that comparison sorts must use

\Omega(nlog(n))

comparisons through a simple argument: for an algorithm to be correct, it must be able to output every possible permutation of

n

elements; otherwise, the algorithm would fail for that particular permutation as input. So, its corresponding decision tree must have at least as many leaves as permutations:

n!

leaves. Any binary tree with at least

n!

leaves has depth at least

log2(n!)=\Omega(nlog2(n))

, so this is a lower bound on the run time of a comparison sorting algorithm. In this case, the existence of numerous comparison-sorting algorithms having this time complexity, such as mergesort and heapsort, demonstrates that the bound is tight.[2]

This argument does not use anything about the type of query, so it in fact proves a lower bound for any sorting algorithm that can be modeled as a binary decision tree. In essence, this is a rephrasing of the information-theoretic argument that a correct sorting algorithm must learn at least

log2(n!)

bits of information about the input sequence. As a result, this also works for randomized decision trees as well.

Other decision tree lower bounds do use that the query is a comparison. For example, consider the task of only using comparisons to find the smallest number among

n

numbers. Before the smallest number can be determined, every number except the smallest must "lose" (compare greater) in at least one comparison. So, it takes at least

n-1

comparisons to find the minimum. (The information-theoretic argument here only gives a lower bound of

log(n)

.) A similar argument works for general lower bounds for computing order statistics.[2]

Linear and algebraic decision trees

x\inRn

as input. The tests in linear decision trees are linear functions: for a particular choice of real numbers

a0,...,an

, output the sign of

a0+

n
style\sum
i=1

aixi

. (Algorithms in this model can only depend on the sign of the output.) Comparison trees are linear decision trees, because the comparison between

xi

and

xj

corresponds to the linear function

xi-xj

. From its definition, linear decision trees can only specify functions

f

whose fibers can be constructed by taking unions and intersections of half-spaces.

Algebraic decision trees are a generalization of linear decision trees that allow the test functions to be polynomials of degree

d

. Geometrically, the space is divided into semi-algebraic sets (a generalization of hyperplane).

These decision tree models, defined by Rabin[3] and Reingold,[4] are often used for proving lower bounds in computational geometry.[5] For example, Ben-Or showed that element uniqueness (the task of computing

f:Rn\to\{0,1\}

, where

f(x)

is 0 if and only if there exist distinct coordinates

i,j

such that

xi=xj

) requires an algebraic decision tree of depth

\Omega(nlog(n))

.[6] This was first showed for linear decision models by Dobkin and Lipton.[7] They also show a

n2

lower bound for linear decision trees on the knapsack problem, generalized to algebraic decision trees by Steele and Yao.[8]

Boolean decision tree complexities

f:\{0,1\}n\to\{0,1\}

for an input

x\in\{0,1\}n

. The queries correspond to reading a bit of the input,

xi

, and the output is

f(x)

. Each query may be dependent on previous queries. There are many types of computational models using decision trees that could be considered, admitting multiple complexity notions, called complexity measures.

Deterministic decision tree

If the output of a decision tree is

f(x)

, for all

x\in\{0,1\}n

, the decision tree is said to "compute"

f

. The depth of a tree is the maximum number of queries that can happen before a leaf is reached and a result obtained.

D(f)

, the deterministic decision tree complexity of

f

is the smallest depth among all deterministic decision trees that compute

f

.

Randomized decision tree

One way to define a randomized decision tree is to add additional nodes to the tree, each controlled by a probability

pi

. Another equivalent definition is to define it as a distribution over deterministic decision trees. Based on this second definition, the complexity of the randomized tree is defined as the largest depth among all the trees in the support of the underlying distribution.

R2(f)

is defined as the complexity of the lowest-depth randomized decision tree whose result is

f(x)

with probability at least

2/3

for all

x\in\{0,1\}n

(i.e., with bounded 2-sided error).

R2(f)

is known as the Monte Carlo randomized decision-tree complexity, because the result is allowed to be incorrect with bounded two-sided error. The Las Vegas decision-tree complexity

R0(f)

measures the expected depth of a decision tree that must be correct (i.e., has zero-error). There is also a one-sided bounded-error version which is denoted by

R1(f)

.

Nondeterministic decision tree

The nondeterministic decision tree complexity of a function is known more commonly as the certificate complexity of that function. It measures the number of input bits that a nondeterministic algorithm would need to look at in order to evaluate the function with certainty.

Formally, the certificate complexity of

f

at

x

is the size of the smallest subset of indices

S\subset[n]

such that, for all

y\in\{0,1\}n

, if

yi=xi

for all

i\inS

, then

f(y)=f(x)

. The certificate complexity of

f

is the maximum certificate complexity over all

x

. The analogous notion where one only requires the verifier to be correct with 2/3 probability is denoted

RC(f)

.

Quantum decision tree

The quantum decision tree complexity

Q2(f)

is the depth of the lowest-depth quantum decision tree that gives the result

f(x)

with probability at least

2/3

for all

x\in\{0,1\}n

. Another quantity,

QE(f)

, is defined as the depth of the lowest-depth quantum decision tree that gives the result

f(x)

with probability 1 in all cases (i.e. computes

f

exactly).

Q2(f)

and

QE(f)

are more commonly known as quantum query complexities, because the direct definition of a quantum decision tree is more complicated than in the classical case. Similar to the randomized case, we define

Q0(f)

and

Q1(f)

.

These notions are typically bounded by the notions of degree and approximate degree. The degree of

f

, denoted

\deg(f)

, is the smallest degree of any polynomial

p

satisfying

f(x)=p(x)

for all

x\in\{0,1\}n

. The approximate degree of

f

, denoted

\widetilde{\deg}(f)

, is the smallest degree of any polynomial

p

satisfying

p(x)\in[0,1/3]

whenever

f(x)=0

and

p(x)\in[2/3,1]

whenever

f(x)=1

.

Beals et al. established that

Q0(f)\geq\deg(f)/2

and

Q2(f)\geq\widetilde{\deg}(f)/2

.[9]

Relationships between boolean function complexity measures

It follows immediately from the definitions that for all

n

-bit Boolean functions

f

,

Q2(f)\leqR2(f)\leqR1(f)\leqR0(f)\leqD(f)\leqn

, and

Q2(f)\leqQ0(f)\leqD(f)\leqn

. Finding the best upper bounds in the converse direction is a major goal in the field of query complexity.

All of these types of query complexity are polynomially related. Blum and Impagliazzo,[10] Hartmanis and Hemachandra, and Tardos[11] independently discovered that

D(f)\leq

2
R
0(f)
. Noam Nisan found that the Monte Carlo randomized decision tree complexity is also polynomially related to deterministic decision tree complexity:

D(f)=

3)
O(R
2(f)
.[12] (Nisan also showed that

D(f)=

2)
O(R
1(f)
.) A tighter relationship is known between the Monte Carlo and Las Vegas models:

R0(f)=

2
O(R
2(f)

logR2(f))

.[13] This relationship is optimal up to polylogarithmic factors.[14] As for quantum decision tree complexities,

D(f)=

4)
O(Q
2(f)
, and this bound is tight.[15] [14] Midrijanis showed that

D(f)=

3)
O(Q
0(f)
,[16] [17] improving a quartic bound due to Beals et al.[9]

It is important to note that these polynomial relationships are valid only for total Boolean functions. For partial Boolean functions, that have a domain a subset of

\{0,1\}n

, an exponential separation between

Q0(f)

and

D(f)

is possible; the first example of such a problem was discovered by Deutsch and Jozsa.

Sensitivity conjecture

See main article: Sensitivity theorem.

f:\{0,1\}n\to\{0,1\}

, the sensitivity of

f

is defined to be the maximum sensitivity of

f

over all

x

, where the sensitivity of

f

at

x

is the number of single-bit changes in

x

that change the value of

f(x)

. Sensitivity is related to the notion of total influence from the analysis of Boolean functions, which is equal to average sensitivity over all

x

.

The sensitivity conjecture is the conjecture that sensitivity is polynomially related to query complexity; that is, there exists exponent

c,c'

such that, for all

f

,

D(f)=O(s(f)c)

and

s(f)=O(D(f)c')

. One can show through a simple argument that

s(f)\leqD(f)

, so the conjecture is specifically concerned about finding a lower bound for sensitivity. Since all of the previously-discussed complexity measures are polynomially related, the precise type of complexity measure is not relevant. However, this is typically phrased as the question of relating sensitivity with block sensitivity.

The block sensitivity of

f

, denoted

bs(f)

, is defined to be the maximum block sensitivity of

f

over all

x

. The block sensitivity of

f

at

x

is the maximum number

t

of disjoint subsets

S1,\ldots,St\subset[n]

such that, for any of the subsets

Si

, flipping the bits of

x

corresponding to

Si

changes the value of

f(x)

.[12]

In 2019, Hao Huang proved the sensitivity conjecture, showing that

bs(f)=O(s(f)4)

.[18] [19]

See also

References

Surveys

Notes and References

  1. Ford. Lester R. Jr.. Johnson. Selmer M.. 1959-05-01. A Tournament Problem. The American Mathematical Monthly. 66. 5. 387–389. 10.1080/00029890.1959.11989306. 0002-9890.
  2. Book: Introduction to algorithms. 2009. MIT Press. Cormen, Thomas H.. 978-0-262-27083-0. Third . Cambridge, Mass.. 676697295.
  3. Rabin. Michael O.. 1972-12-01. Proving simultaneous positivity of linear forms. Journal of Computer and System Sciences. en. 6. 6. 639–650. 10.1016/S0022-0000(72)80034-5. 0022-0000. free.
  4. Reingold. Edward M.. 1972-10-01. On the Optimality of Some Set Algorithms. Journal of the ACM. 19. 4. 649–659. 10.1145/321724.321730. 18605212. 0004-5411. free.
  5. Book: Preparata, Franco P.. Computational geometry : an introduction. 1985. Springer-Verlag. Shamos, Michael Ian.. 0-387-96131-3. New York. 11970840.
  6. Book: Ben-Or, Michael. Proceedings of the fifteenth annual ACM symposium on Theory of computing - STOC '83 . Lower bounds for algebraic computation trees . 1983-12-01. STOC '83. New York, NY, USA. Association for Computing Machinery. 80–86. 10.1145/800061.808735. 978-0-89791-099-6. 1499957. free.
  7. Dobkin. David. Lipton. Richard J.. 1976-06-01. Multidimensional Searching Problems. SIAM Journal on Computing. 5. 2. 181–186. 10.1137/0205015. 0097-5397.
  8. Michael Steele. J. Yao. Andrew C. 1982-03-01. Lower bounds for algebraic decision trees. Journal of Algorithms. en. 3. 1. 1–8. 10.1016/0196-6774(82)90002-5. 0196-6774.
  9. Beals . R. . Buhrman, H. . Cleve, R. . Mosca, M. . de Wolf, R. . 2001 . Quantum lower bounds by polynomials . Journal of the ACM . 48 . 4 . 778–797 . 10.1145/502090.502097. quant-ph/9802049 . 1078168 .
  10. Blum . M. . Impagliazzo, R. . Generic oracles and oracle classes . 1987 . Proceedings of 18th IEEE FOCS . 118–126.
  11. Tardos . G. . Query complexity, or why is it difficult to separate NPA ∩ coNPA from PA by random oracles A? . Combinatorica . 1989 . 385–392. 9 . 4 . 10.1007/BF02125350. 45372592 .
  12. Nisan . N. . Noam Nisan . CREW PRAMs and decision trees . 1989 . Proceedings of 21st ACM STOC . 327–335.
  13. Kulkarni, R. and Tal, A. On Fractional Block Sensitivity. Electronic Colloquium on Computational Complexity (ECCC). Vol. 20. 2013.
  14. Ambainis. Andris. Balodis. Kaspars. Belovs. Aleksandrs. Lee. Troy. Santha. Miklos. Smotrovs. Juris. 2017-09-04. Separations in Query Complexity Based on Pointer Functions. Journal of the ACM. 64. 5. 32:1–32:24. 10.1145/3106234. 1506.04719. 10214557. 0004-5411.
  15. Aaronson. Scott. Ben-David. Shalev. Kothari. Robin. Rao. Shravas. Tal. Avishay. 2020-10-23. Degree vs. Approximate Degree and Quantum Implications of Huang's Sensitivity Theorem. quant-ph. 2010.12629.
  16. Midrijanis . Gatis . 2004 . quant-ph/0403168 . cs2. Exact quantum query complexity for total Boolean functions .
  17. Midrijanis . Gatis . 2005 . quant-ph/0501142 . cs2. On Randomized and Quantum Query Complexities .
  18. Huang. Hao. 2019. Induced subgraphs of hypercubes and a proof of the Sensitivity Conjecture. Annals of Mathematics. 190. 3. 949–955. 10.4007/annals.2019.190.3.6. 10.4007/annals.2019.190.3.6. 1907.00847. 195767594. 0003-486X.
  19. Web site: Klarreich. Erica. Decades-Old Computer Science Conjecture Solved in Two Pages. 2019-07-26. Quanta Magazine.