# Decision tree model

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 branching operations based on comparisons of some quantities, the comparisons being assigned unit computational cost.

The branching operations are called "tests" or "queries". In this setting the algorithm in question may be viewed as a computation of a Boolean function $f:\{0,1\}^{n}\rightarrow \{0,1\}$ where the input is a series of queries and the output is the final decision. Each query may be dependent on previous queries.

Several variants of decision tree models have been introduced, depending on the complexity of the operations allowed in the computation of a single comparison and the way of branching.

Decision trees models are instrumental in establishing lower bounds for complexity theory for certain classes of computational problems and algorithms. The computational complexity of a problem or an algorithm expressed in terms of the decision tree model is called its decision tree complexity or query complexity.

## Classification by query computational complexity

### Simple decision tree

The model in which every decision is based on the comparison of two numbers within constant time is called a decision tree model. It was introduced to establish computational complexity of sorting and searching.

The simplest illustration of this lower bound technique is for the problem of finding the smallest number among $n$ numbers using only comparisons. In this case the decision tree model is a binary tree. Algorithms for this searching problem may result in $n$ different outcomes (since any of the $n$ given numbers may turn out to be the smallest one). It is known that the depth of a binary tree with $n$ leaves is at least $\log n$ , which gives a lower bound of $\Omega (\log n)$ for the searching problem.

However this lower bound is known to be slack, since the following simple argument shows that at least $n-1$ comparisons are needed: Before the smallest number can be determined, every number except the smallest must "lose" (compare greater) in at least one comparison.

Along the same lines a lower bound of $\Omega (n\log n)$ for sorting may be proved. 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.

### Linear decision tree

Linear decision trees, just like simple decision trees, make a branching decision based on a set of values as input. As opposed to binary decision trees, linear decision trees have three output branches. A linear function, which is any function of the form $a_{0}+\sum _{i=1}^{n}a_{i}x_{i}$ for some real numbers $a_{0},\dots ,a_{n}$ is being tested and branching decisions are made based on the sign of the function (negative, positive, or 0).

Geometrically, $f(x)$ defines a hyperplane in Rn. A set of input values reaching any particular node represents the intersection of the half-planes defined by the nodes.

### Algebraic decision tree

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). The evaluation of the complexity is typically more difficult.

## Classification by query computational model

### 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 $p_{i}$ . 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. $R_{2}(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).

$R_{2}(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 $R_{0}(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 $R_{1}(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.

### Quantum decision tree

The quantum decision tree complexity $Q_{2}(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, $Q_{E}(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). $Q_{2}(f)$ and $Q_{E}(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 $Q_{0}(f)$ and $Q_{1}(f)$ .

## Relationship between different models

It follows immediately from the definitions that for all $n$ -bit Boolean functions $f$ , $Q_{2}(f)\leq R_{2}(f)\leq R_{1}(f)\leq R_{0}(f)\leq D(f)\leq n$ , and $Q_{2}(f)\leq Q_{E}(f)\leq D(f)\leq n$ .

Blum and Impagliazzo, Hartmanis and Hemachandra, and Tardos independently discovered that $D(f)\leq R_{0}(f)^{2}$ . Noam Nisan found that the Monte Carlo randomized decision tree complexity is also polynomially related to deterministic decision tree complexity: $D(f)=O(R_{2}(f)^{3})$ . (Nisan also showed that $D(f)=O(R_{1}(f)^{2})$ .) A tighter relationship is known between the Monte Carlo and Las Vegas models: $R_{0}(f)=O(R_{2}(f)^{2}\log R_{2}(f))$ . This relationship is optimal up to polylogarithmic factors.

The quantum decision tree complexity $Q_{2}(f)$ is also polynomially related to $D(f)$ . Midrijanis showed that $D(f)=O(Q_{E}(f)^{3})$ , improving a quartic bound due to Beals et al. Beals et al. also showed that $D(f)=O(Q_{2}(f)^{6})$ , and this is still the best known bound. However, the largest known gap between deterministic and quantum query complexities is only quadratic. A quadratic gap is achieved for the OR function; $D(OR_{n})=n$ while $Q_{2}(OR_{n})=\Theta ({\sqrt {n}})$ .

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 $Q_{E}(f)$ and $D(f)$ is possible; the first example of such a problem was discovered by Deutsch and Jozsa.

These relationships can be summarized by the following inequalities, which are true up to constant factors:

• $D(f)\leq R_{0}(f)^{2}$ • $D(f)\leq R_{1}(f)R_{2}(f)$ • $D(f)\leq R_{2}(f)^{3}$ • $R_{0}(f)\leq R_{2}(f)^{2}\log R_{2}(f)$ • $D(f)\leq Q_{2}(f)^{6}$ • $D(f)\leq Q_{E}(f)^{2}Q_{2}(f)^{2}$ • $D(f)\leq Q_{1}(f)^{2}Q_{2}(f)^{2}$ • $R_{0}(f)\leq Q_{1}(f)Q_{2}(f)^{2}\log N$ • $D(f)\leq Q_{1}(f)Q_{2}(f)^{2}$ ## See also

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.