The deterministic query complexity of Deutsch–Jozsa #
The Deutsch–Jozsa problem Deutsch, Jozsa, as stated in
de Wolf, §2.4.1: the input x ∈ {0,1}^N is promised to be either constant or
balanced, with exactly N/2 true bits (Cslib.BitString.IsBalanced). The goal is to decide
which. The library has no promise-problem type for query complexity. As for Bernstein–Vazirani and
Simon's problem, the lower bounds therefore take any total function that answers correctly on the
promise inputs (Cslib.QueryComplexity.SolvesDeutschJozsa: true on constant inputs, false on
balanced ones).
Lower bound. Over N = 2m positions every deterministic decision tree needs depth m + 1
(Cslib.QueryComplexity.depth_ge_of_solvesDeutschJozsa). The adversary answers false to every
query. If the tree stops after at most m queries on the all-false input, m unqueried positions
remain. The balanced input that is true on exactly those positions agrees with the all-false input
on every queried position, so it reaches the same leaf
(Cslib.DecisionTree.eval_eq_of_forall_mem_queries). But the two inputs need different answers.
de Wolf §2.4.1 states this bound with a one-line argument. Here it is derived for an arbitrary
tree, through the queries the tree makes on the all-false input.
Upper bound. Querying m + 1 distinct positions suffices
(Cslib.QueryComplexity.deutschJozsaTree_solves). A balanced input cannot be constant on more
than m positions, so any m + 1 positions of a balanced input contain both values.
So m + 1 is the least decision-tree complexity of a total function that solves Deutsch–Jozsa
(Cslib.QueryComplexity.isLeast_complexity_solvesDeutschJozsa). For N = 2^n positions this is
2^{n-1} + 1, against the single exact quantum query of
CslibFrontier/Computability/QueryComplexity/Quantum/DeutschJozsa.lean.
Main definitions #
Cslib.QueryComplexity.SolvesDeutschJozsa: a total function that answers the Deutsch–Jozsa promise problem.Cslib.QueryComplexity.deutschJozsaTree: query a list of positions and answer whether the bits read are all equal.
Main results #
Cslib.QueryComplexity.lt_depth_of_eval_ne: over2mpositions, a tree that separates the all-false input from every balanced input has depth greater thanm.Cslib.QueryComplexity.depth_ge_of_solvesDeutschJozsa,Cslib.QueryComplexity.complexity_ge_of_solvesDeutschJozsa: the lower boundm + 1.Cslib.QueryComplexity.deutschJozsaTree_solves:m + 1distinct queries suffice.Cslib.QueryComplexity.isLeast_complexity_solvesDeutschJozsa: the deterministic complexity of the promise problem is exactlym + 1.
References #
A total function F solves the Deutsch–Jozsa problem when it answers true on every
constant input and false on every balanced input. Inputs outside the promise are unconstrained.
Fanswerstrueon constant inputs.Fanswersfalseon balanced inputs.
The adversary bound. Over 2m positions, a decision tree that gives every balanced input
an output other than its output on the all-false input has depth greater than m.
The deterministic lower bound for Deutsch–Jozsa de Wolf, §2.4.1: over
2m positions, every decision tree that solves the Deutsch–Jozsa problem has depth at least
m + 1.
The deterministic query complexity of every total function solving Deutsch–Jozsa over
2m positions is at least m + 1.
Query the positions of l and answer whether the bits read are all equal.
The tree deutschJozsaTree l answers whether x is constant on l.
m + 1 distinct queries solve Deutsch–Jozsa over 2m positions: a balanced input is
constant on at most m positions.
The deterministic query complexity of the Deutsch–Jozsa promise problem over 2m ≥ 2
positions is m + 1: it is the least decision-tree complexity of a total function that solves the
problem.