We give and prove an optimal exact quantum query algorithm with complexity
k+1 for computing the promise problem (i.e., symmetric and partial Boolean function)
DJnk defined as:
DJnk(x)=1 for
∣x∣=n/2,
DJnk(x)=0 for
∣x∣ in the set
{0,1,…,k,n−k,n−k+1,…,n}, and it is undefined for the rest cases, where
n is even,
∣x∣ is the Hamming weight of
x. The case of
k=0 is the well-known Deutsch-Jozsa problem. We outline all symmetric (and partial) Boolean functions with degrees 1 and 2, and prove their exact quantum query complexity. Then we prove that any symmetrical (and partial) Boolean function
f has exact quantum 1-query complexity if and only if
f can be computed by the Deutsch-Jozsa algorithm. We also discover the optimal exact quantum 2-query complexity for distinguishing between inputs of Hamming weight
{⌊n/2⌋,⌈n/2⌉} and Hamming weight in the set
{0,n} for all odd
n. In addition, a method is provided to determine the degree of any symmetrical (and partial) Boolean function.
The approximate degree of a Boolean function
f(x1,x2,…,xn) is the minimum degree of a real polynomial that approximates
f pointwise within
1/3. Upper bounds on approximate degree have a variety of applications in learning theory, differential privacy, and algorithm design in general. Nearly all known upper bounds on approximate degree arise in an existential manner from bounds on quantum query complexity. We develop a novel, first-principles approach to the polynomial approximation of Boolean functions. We use it to give the first constructive upper bounds on the approximate degree of several fundamental problems:
O(n43−4(2k−1)1) for the
k-element distinctness problem;
O(n1−k+11) for the
k-subset sum problem;
O(n1−k+11) for any
k-DNF or
k-CNF formula; and
O(n3/4) for the surjectivity problem. In all cases, we obtain explicit, closed-form approximating polynomials that are unrelated to the quantum arguments from previous work. Our first three results match the bounds from quantum query complexity. Our fourth result improves polynomially on the
Θ(n) quantum query complexity of the problem and refutes the conjecture by several experts that surjectivity has approximate degree
Ω(n). In particular, we exhibit the first natural problem with a polynomial gap between approximate degree and quantum query complexity.