OSSS inequality Created 2026-09-24 Updated 2026-09-24
For a Boolean function of independent coordinates and a randomized decision tree that determines it, the OSSS inequality bounds its variance by a sum of coordinate influences weighted by their revealment probabilities.
Parity lower bound for Boolean queries 2026-10-14
For three bits, the Boolean function outputs one when is odd, where denotes exclusive or. Unlike the three-bit majority decision tree, an exact decision tree computing parity must inspect all three bits on every input. If any coordinate is unread, two completions differing only at that coordinate follow the same observed graph path but have opposite parity. A single leaf cannot correctly label both.
The same argument works for bits: parity needs all queries on every input, whatever their order. Thus its decision-tree depth is , its expected query cost is for every input probability distribution, and each coordinate revealment is one. The algorithm remains required to be correct on the whole Boolean cube, even if the chosen probability distribution assigns some inputs zero probability; a promise restricting permitted inputs would be a different computational problem.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 39 3 Solution 2026-10-14
The response is the species categorical variable, while the four measurements are candidate predictors. The dot in the formula means all other columns of the data frame. The fitted object is a classification tree: it recursively partitions predictor space by binary threshold rules and assigns a species and class-probability vector to each terminal region. Sepal width was available but was not selected in the displayed tree.
At a node , let be the number of observations of class and . The multinomial likelihood is maximized by . The fitted class is one attaining the largest proportion, with a software convention resolving ties. The classification-tree deviance isA pure node has zero deviance. At each nonterminal node, consider candidate split points between distinct observed predictor values, and choose the split with the largest decrease . Repeating this local maximization constructs a binary decision tree; it does not solve a global optimization over all trees. Growth stops when nodes are pure or size/deviance controls prohibit further splitting. Mixed leaves with five or six observations can therefore remain. The node number has children and , and a terminal-node marker means that no further split was retained.
The probability triples are in class order , not . For example, the pure left leaf has probability vector and predicts , while the 54-observation node has counts and predicts . The root counts are , giving and a tied majority class. Its reported choice of does not indicate a more common class.
The complete derived decision rule is shown below. Each leaf includes its fitted class and the observed class counts, so both the branching logic and its remaining errors are visible. For the observed data, the printed strict inequalities leave no equality cases because the thresholds fall between measurement values. A consistent right-branch convention at equality extends the rule to new specimens.
Six-leaf iris classification tree with fitted classes and class counts at every terminal node
. Details. The six terminal nodes contain the class countsThus the training misclassification error isThe terminal classification-tree deviance is insteadThe displayed residual mean deviance divides this by , yielding approximately . This is the summary's reporting convention, not a normal-error residual mean square or an automatic chi-squared calibration with 144 statistical degrees of freedom. The two summary measures answer different questions: deviance depends on the fitted probability of each observed class, while misclassification counts only whether the majority-class prediction is correct. Both are training quantities. Cross-validation or independent test data, rather than the displayed training error, are needed to assess prediction on new specimens; cost-complexity tree pruning can select a less elaborate tree if predictive performance warrants it.
Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 51 1 e Solution Created 2026-10-03 Updated 2026-10-14
A classical query with known answer bit reveals exactly the one bit , since it returns . For the four promised Boolean functions, the value table isEvery possible first query splits the four alternatives into one class of size one and another of size three. On the branch with three remaining alternatives, a second binary answer can separate at most two classes. At least two alternatives therefore still agree on that branch, regardless of how the second query was chosen adaptively. This decision tree argument proves that a procedure guaranteed to identify every alternative needs at least three queries in the worst case.
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 1 4H iii Solution Created 2026-09-24 Updated 2026-10-14
The procedure in part (i) sometimes needs five tests, for items one or two. A binary decision tree of height has at most leaves, so distinguishing ten possibilities requires .
Past exam of the mathematics course of the University of Cambridge 2009 ii Paper 1 4H i Solution Created 2026-09-24 Updated 2026-10-14
Each test divides the current candidate set into a tested subset and its complement: failure places the defective item inside the subset, whereas success places it outside. A sequence of tests is therefore a binary decision tree, and minimizing its expected depth is the Huffman coding problem with weights .
Combine the smallest two current weights repeatedly. One choice of merges is , , , , , , , , . It gives this explicit prefix code:At any node, test the candidate items whose next code digit is one. Assign failure to digit one and success to digit zero, and repeat until only a single codeword remains. This specifies every test, including the first subset . Huffman coding minimizes the weighted codeword lengths, so the optimal expected number isThe sum of the successive merged weights is another check on the numerator .
Past exam of the mathematics course of the University of Cambridge 2011 ii Paper 1 4G Solution Created 2026-09-24 Updated 2026-10-14
Use binary search: maintain the interval of possible integers and ask whether is at least the first integer in its upper half. Each answer reduces the number of possibilities to at most its previous number divided by two, rounded up. After questions at most possibilities remain. Since , twenty questions suffice.
A yes/no decision tree of depth twenty has at most leaves, whereas the possible finishing orders number . Thus twenty questions cannot identify the finishing order of fifteen horses, assuming no ties. With unrestricted yes/no questions, the exact minimum for horses is : the leaf count is a lower bound, and repeatedly partitioning the remaining permutations into two nearly equal sets attains it. In particular fifteen horses require 41 questions.
By Stirling's formula,so the leading number of questions is . These questions may ask about whole sets of possible orders; restricting them to pairwise comparisons is a different model.
Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 82 6 Solution Created 2026-10-03 Updated 2026-10-14
Use a Boolean circuit of unbounded-fan-in AND and OR gates, with negations pushed to the input Boolean literals. Its circuit depth is the largest number of AND/OR gates on an input-to-output path, and its circuit size counts these gates. Constants and Boolean literals may be supplied as inputs. Equivalent standard size conventions only enlarge the absolute constants. One can merge adjacent gates of the same type; the depth-reduction argument below keeps the two possible normal forms available at each gate.
A random restriction with parameter independently leaves each variable live with probability and otherwise fixes it to zero or one with probability each. The Håstad switching lemma states that for a width- DNF or conjunctive normal form ,Width bounds Boolean literals in a term or clause, not the number of terms. A decision tree of depth at most has both a DNF and a conjunctive normal form of width at most and has real multilinear degree at most . Indeed every leaf condition is a product of at most factors or ; sum the accepting leaves. The switching lemma controls the canonical decision tree, hence implies this representation bound.
We detail the Boolean circuit simplification parameters. First use a -random restriction. For a bottom AND gate, let count its live Boolean literals on the event that no fixed Boolean literal kills it. For distinct Boolean literals,Thus the probability of retaining more than live Boolean literals without becoming constant is at most . The same calculation applies to bottom OR gates, with the opposite killing value. Repeated Boolean literals are removed and contradictory Boolean literals make a constant gate. A union bound makes all nonconstant bottom gates width at most , except with probability at most .
Now apply successive restrictions, each retaining probability of the remaining variables. At a two-layer gate, the current bottom forms are width- DNFs or conjunctive normal forms. The Håstad switching lemma bounds its probability of failing to reduce to decision-tree depth at most by . Convert the successful decision tree into the opposite normal form, whose terms or clauses have width at most , and merge its outer gate with the adjacent gate of the same type. This removes one layer. Repeat upwards until the output has a depth- decision tree.
The bookkeeping matters: although a decision tree may give clauses, each subsequent switching event is charged to the corresponding original Boolean circuit gate, not to each newly created clause. The lemma permits any number of terms. Each original gate is charged once, so the sum of the failure probabilities is at most , without an extra exponential size factor. Conditioning on successful preceding stages is harmless because each next restriction is fresh and the width bound holds for every preceding success. For a general Boolean circuit the conjunctive normal form or DNF representation at a shared gate can be chosen separately for each outgoing use; no extra gates need to be counted as switching targets.
The composed restriction has live-variable probabilityFixed values are still unbiased and coordinates independent. We have proved the useful intermediate estimateFor , the initial bottom-gate argument alone gives this conclusion. This is a depth-reduction estimate, not the desired Fourier-tail theorem used as a black box.
Next derive exactly how restrictions affect the Fourier-Walsh transform. Let be the random live set and the fixed assignment outside . With , the restricted coefficient at isOrthogonality of the fixed-coordinate characters eliminates cross terms after averaging over . Thereforeand then averaging over gives the expected Fourier weight after a random restriction identityThe original high-degree tail is not preserved: each original coefficient is weighted by a binomial distribution survival probability. On successful restrictions the left-hand tail vanishes; on failures it is at most one by Parseval's identity and . Hence its expectation is at most .
Put . If , choose and the preceding value of . For every , the binomial distribution mean satisfiesIts variance is at most . The Chebyshev inequality givesThus the exact expectation identity bounds at least half the original tail above , andWhen the same bound follows from the trivial total-weight bound . We obtain explicit absolute constants,This supplies the requested overview of the Linial-Mansour-Nisan theorem with the actual switching scale, gate-count bookkeeping and restriction-to-Fourier calculation. The argument uses the unbounded-fan-in AND/OR Boolean circuit basis; allowing arbitrary gates would make the theorem false, since one parity gate could have all its nonconstant Fourier weight at level . The original theorem is Linial, Mansour and Nisan's circuit Fourier bound.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 59 4 a Solution Created 2026-10-03 Updated 2026-10-07
A decision tree queries individual input bits, chooses subsequent queries from previous answers and labels each leaf with an output. Its decision-tree depth is the largest number of queries on any root-to-leaf path; is the least such depth over trees computing . An evasive Boolean function on bits has .
Remove repeated queries along any path, since their answers are already known. A leaf at depth fixes bits and leaves at least one bit free. The inputs reaching it form a subcube on which is constant, say . Its contribution to the alternating sum isHere is the Hamming weight. The leaf subcubes partition the input cube, so adding their contributions provesThe contrapositive is the alternating-sum criterion for decision-tree evasiveness: a nonzero alternating sum forces all bits to be necessary in the worst case.
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 59 4 c Solution Created 2026-10-03 Updated 2026-10-07
A query certificate for input is a subset of coordinates such that every agreeing with on has the same value of . Define certificate complexity of a Boolean function byIf no input has output , take . Unlike a decision tree, a query certificate may be selected with full knowledge of the input.
Take a full star graph centered at , containing all incident edges and no others. For any edge not incident to , changing only its bit from zero to one destroys the common-center graph property: two spokes already force as the only possible common endpoint. Therefore every positive query certificate for this input must include every nonincident edge bit, otherwise this one-bit change would preserve its answers but change the output. There are such bits. Conversely, fixing all those bits to zero suffices for a query certificate, because all remaining edges are incident to . HenceThe upper bound for holds for any accepted graph by choosing any valid center and certifying its nonincident edges absent.
For completeness, the negative side is much smaller. Given a graph with no common center, choose a present edge , an edge not containing , and an edge not containing . These at most three present edges have empty common intersection and certify rejection. A triangle with isolated additional vertices needs all three of its present edges: with at most two queries, set every unqueried edge absent and the remaining present edges share a vertex. Thus the certificates for the common-center graph property satisfy
Three-bit majority decision tree 2026-10-14
Three votes give a small but revealing majority function:Our decision tree queries , then . If these bits agree, return their common value: two equal votes already force the majority function. If they disagree, query and return its value. The first two queries have a fixed order, but whether a third query occurs is adaptive.
Each internal label in the diagram names the next bit to inspect. Each leaf lists its output, decision-tree query cost , and compatible inputs; an asterisk denotes an unread bit. The two shallow leaves each cover two inputs, while each deeper leaf covers one. Reading every bit would also compute the majority function, but would miss these exact shortcuts.
All eight inputs give the following exhaustive check. The parity column is the parity of , computed by exclusive or; its decision-tree query cost is justified under parity lower bound for Boolean queries.
The worst inputs for this decision tree are , exactly those with . Its actual depth is three. Every exact decision tree for this majority function has depth at least three: after the first query, an adversary can answer the second distinct query with the opposite bit, leaving the last bit decisive. Consequently its optimal decision-tree depth is , even though some inputs finish sooner. Every input has a two-bit query certificate, namely two agreeing votes; locating those votes can require a third query. This separates having a short query certificate from finding one.

