Abstract
We show how to select an item with the majority color from n two-colored items, given access to the items only through an oracle that returns the discrepancy of subsets of k items (the absolute value of the difference between the numbers of items with each color). We use \(n/\lfloor \tfrac{k}{2}\rfloor +O(k)\) queries, improving a previous method by De Marco and Kranakis that used \(n-k+k^2/2\) queries. We also prove a lower bound of \(n/(k-1)-O (n^{1/3})\) on the number of queries needed, both for discrepancy queries and to queries that return the partition of items into monochromatic subsets. This improves a lower bound of \(\lfloor n/k\rfloor \) by De Marco and Kranakis.



Similar content being viewed by others
Notes
There is a bug in their method for odd k, in Case 1 of Theorem 4.1, when \(i=\lfloor k/2\rfloor \).
References
Aigner, M.: Variants of the majority problem. Discret. Appl. Math. 137(1), 3–25 (2004). doi:10.1016/S0166-218X(03)00186-0
Aigner, M.: Two colors and more. Entropy, Search, Complexity. pp. 9–26. Springer, Bolyai Soc. Math. Stud. 16 (2007). doi:10.1007/978-3-540-32777-6_1
Aigner, M., De Marco, G., Montangero, M.: The plurality problem with three colors and more. Theor. Comput. Sci. 337(1–3), 319–330 (2005). doi:10.1016/j.tcs.2004.12.035
Alonso, L., Reingold, E.M., Schott, R.: Determining the majority. Inf. Process. Lett. 47(5), 253–255 (1993). doi:10.1016/0020-0190(93)90135-V
Alonso, L., Reingold, E.M., Schott, R.: The average-case complexity of determining the majority. SIAM J. Comput. 26(1), 1–14 (1997). doi:10.1137/S0097539794275914
Beck, J., Chen, W.W.L.: Irregularities of Distribution. Cambridge Tracts in Mathematics 89. Cambridge University Press, Cambridge (2008)
Chung, F., Graham, R., Mao, J., Yao, A.: Oblivious and adaptive strategies for the majority and plurality problems. Algorithmica 48(2), 147–157 (2007). doi:10.1007/s00453-007-0060-0
De Marco, G., Kranakis, E.: Searching for majority with \(k\)-tuple queries. Discret. Math. Algorithms Appl. 7(2), 1550009 (2015). doi:10.1142/S1793830915500093
De Marco, G., Kranakis, E., Wiener, G.: Computing majority with triple queries. Theor. Comput. Sci. 461, 17–26 (2012). doi:10.1016/j.tcs.2012.03.039
Du, D.-Z., Hwang, F.K.: Combinatorial Group Testing and its Applications, 2nd edn. Ser. Appl. Math. 12. World Scientific (2000)
Dvořák, Z., Jelínek, V., Král, D., Kynčl, J., Saks, M.: Probabilistic strategies for the partition and plurality problems. Random Struct. Algorithms 30(1–2), 63–77 (2007). doi:10.1002/rsa.20148
Eppstein, D., Goodrich, M.T., Hirschberg, D.S.: Improved combinatorial group testing algorithms for real-world problem sizes. SIAM J. Comput. 36(5), 1360–1375 (2007). doi:10.1137/050631847
Eppstein, D., Goodrich, M. T., Hirschberg, D. S.: Combinatorial pair testing: distinguishing workers from slackers. In: Proceedings of 13th International Symposium Algorithms and Data Structures (WADS 2013). Lecture Notes in Computer Science, vol. 8037, pp. 316–327. Springer (2013). doi:10.1007/978-3-642-40104-6_28
Gerbner, D., Keszegh, B., Pálvölgyi, D., Patkós, B., Vizer, M., Wiener, G.: Finding a non-minority ball with majority answers. Discret. Appl. Math. 219, 18–31 (2017). doi:10.1016/j.dam.2016.11.012
Gerbner, D., Vizer, M.: Majority problems of large query size. Electronic preprint. arxiv:1610.09114, (2016)
Kráľ, D., Sgall, J., Tichý, T.: Randomized strategies for the plurality problem. Discret. Appl. Math. 156(17), 3305–3311 (2008). doi:10.1016/j.dam.2008.05.014
Saks, M.E., Werman, M.: On computing majority by comparisons. Combinatorica 11(4), 383–387 (1991). doi:10.1007/BF01275672
Valiant, L.G.: Short monotone formulae for the majority function. J. Algorithms 5(3), 363–366 (1984). doi:10.1016/0196-6774(84)90016-6
Wiener, G.: Search for a majority element. J. Stat. Plan. Inference 100(2), 313–318 (2002). doi:10.1016/S0378-3758(01)00142-2
Author information
Authors and Affiliations
Corresponding author
Additional information
David Eppstein was supported in part by NSF Grants CCF-1228639, CCF-1618301, and CCF-1616248. A preliminary version of this paper appeared at the 12th Latin American Theoretical Informatics Symposium (LATIN 2016), Lecture Notes in Computer Science 9644 (2016), pp. 390–402.
Rights and permissions
About this article
Cite this article
Eppstein, D., Hirschberg, D.S. From Discrepancy to Majority. Algorithmica 80, 1278–1297 (2018). https://doi.org/10.1007/s00453-017-0303-7
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-017-0303-7