Quantum Information Processing, Vol. 7, No. 1, February 2008 (© 2008)
A Quantum Algorithm for Finding the Modal Value
Mark W. Coffey
and Zachary Prezkuta
Received October 10, 2007; accepted November 14, 2007; Published online: January 13, 2008
We present a quantum algorithm for ﬁnding the most often occurring (or modal)
value of a data set. We thereby supplement other algorithms that can determine
the mean value or similar quantities. Our algorithm requires the combined use of
quantum counting and extended quantum search.
KEY WORDS: modal value; quantum search; quantum counting.
In this article, we present a quantum algorithm for ﬁnding the modal
value(s) of a data set. The mode is the most often occurring value in
the data and is an important statistic. For the sake of definiteness in the
description, we assume a data list of N elements, each entry being an inte-
ger in the range [1,d]. We propose an algorithm that uses a combina-
tion of quantum counting
and quantum search,
and makes use
of the result that quantum search may be applied to ﬁnd more than one
target item in an unsorted list and that the number of target items need
not be known beforehand. Our method gives an operational complexity
N), as measured in the number of oracle calls. The modal value
need not be unique for our algorithm to succeed.
Our algorithm for determining the mode is related to other algo-
rithms that also apply quantum search, give a quadratic speed up over
the classical situation, and deliver other useful statistics. These include an
algorithm for ﬁnding the minimum or maximum value in a data set.
In addition, the mean value may be determined.
Then the variance and
Department of Physics, Colorado School of Mines, Golden, CO 80401, USA.
To whom correspondence should be addressed. E-mail: email@example.com
1570-0755/08/0200-0051/0 © 2008 Springer Science+Business Media, LLC