Past exam of the mathematics course of the University of Cambridge 2012 iii Paper 67 2 c Solution Created 2026-10-03 Updated 2026-10-07
First use the allowed one-query algorithm to learn exactly. This restricted two-index Boolean quantum oracle is realized by relabelling indices in a single query to the original input. Measure its output and choose the second query classically.
If , the first two bits agree and their common value is the majority, irrespective of . Query and output it. If , the first two bits cancel in the vote, so query and output it. ThusThe exact two-query majority algorithm uses one parity query and one ordinary bit query on every branch, and is correct on all eight inputs. Together with the lower bound this proves .