Skip to main content

Finding a Mediocre Player

  • Conference paper
  • First Online:
Algorithms and Complexity (CIAC 2019)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 11485))

Included in the following conference series:

Abstract

Consider a totally ordered set S of n elements; as an example, a set of tennis players and their rankings. Further assume that their ranking is a total order and thus satisfies transitivity and anti-symmetry. Following Yao [29], an element (player) is said to be (ij)-mediocre if it is neither among the top i nor among the bottom j elements of S. More than 40 years ago, Yao suggested a stunningly simple algorithm for finding an (ij)-mediocre element: Pick \(i+j+1\) elements arbitrarily and select the \((i+1)\)-th largest among them. She also asked: “Is this the best algorithm?” No one seems to have found such an algorithm ever since.

We first provide a deterministic algorithm that beats the worst-case comparison bound in Yao’s algorithm for a large range of values of i (and corresponding suitable \(j=j(i)\)). We then repeat the exercise for randomized algorithms; the average number of comparisons of our algorithm beats the average comparison bound in Yao’s algorithm for another large range of values of i (and corresponding suitable \(j=j(i)\)); the improvement is most notable in the symmetric case \(i=j\). Moreover, the tight bound obtained in the analysis of Yao’s algorithm allows us to give a definite answer for this class of algorithms. In summary, we answer Yao’s question as follows: (i) “Presently not” for deterministic algorithms and (ii) “Definitely not” for randomized algorithms. (In fairness, it should be said however that Yao posed the question in the context of deterministic algorithms.)

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 74.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    We could formulate a general algorithm for finding an (ij)-mediocre element, acting differently in a specified range, as we did for the deterministic algorithm in Sect. 2. However, for clarity, we preferred to specify it in this way.

References

  1. Ajtai, M., Komlós, J., Steiger, W.L., Szemerédi, E.: Optimal parallel selection has complexity \(O(\log \log {n})\). J. Comput. Syst. Sci. 38(1), 125–133 (1989)

    Article  MathSciNet  Google Scholar 

  2. Alexandrescu, A.: Fast deterministic selection. In: Proceedings of the 16th International Symposium on Experimental Algorithms (SEA 2017), June 2017, London, pp. 24:1–24:19 (2017)

    Google Scholar 

  3. Baase, S.: Computer Algorithms: Introduction to Design and Analysis, 2nd edn. Addison-Wesley, Reading (1988)

    MATH  Google Scholar 

  4. Battiato, S., Cantone, D., Catalano, D., Cincotti, G., Hofri, M.: An efficient algorithm for the approximate median selection problem. In: Bongiovanni, G., Petreschi, R., Gambosi, G. (eds.) CIAC 2000. LNCS, vol. 1767, pp. 226–238. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-46521-9_19

    Chapter  Google Scholar 

  5. Bent, S.W., John, J.W.: Finding the median requires \(2n\) comparisons. In: Proceedings of the 17th Annual ACM Symposium on Theory of Computing (STOC 1985), pp. 213–216. ACM (1985)

    Google Scholar 

  6. Blum, M., Floyd, R.W., Pratt, V., Rivest, R.L., Tarjan, R.E.: Time bounds for selection. J. Comput. Syst. Sci. 7(4), 448–461 (1973)

    Article  MathSciNet  Google Scholar 

  7. Chen, K., Dumitrescu, A.: Select with groups of 3 or 4. In: Dehne, F., Sack, J.R., Stege, U. (eds.) WADS 2015. LNCS, vol. 9214, pp. 189–199. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21840-3_16. arXiv.org/abs/1409.3600

    Chapter  Google Scholar 

  8. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 3rd edn. MIT Press, Cambridge (2009)

    MATH  Google Scholar 

  9. Cunto, W., Munro, J.I.: Average case selection. J. ACM 36(2), 270–279 (1989)

    Article  MathSciNet  Google Scholar 

  10. Dor, D., Håstad, J., Ulfberg, S., Zwick, U.: On lower bounds for selecting the median. SIAM J. Discrete Math. 14(3), 299–311 (2001)

    Article  MathSciNet  Google Scholar 

  11. Dor, D., Zwick, U.: Finding the \(\alpha n\)-th largest element. Combinatorica 16(1), 41–58 (1996)

    Article  MathSciNet  Google Scholar 

  12. Dor, D., Zwick, U.: Selecting the median. SIAM J. Comput. 28(5), 1722–1758 (1999)

    Article  MathSciNet  Google Scholar 

  13. Dumitrescu, A.: A selectable sloppy heap. Algorithms 12(3), 58 (2019). https://doi.org/10.3390/a12030058

    Article  Google Scholar 

  14. Dumitrescu, A.: Finding a mediocre player (2019, preprint). arXiv.org/abs/1901.09017

  15. Edelkamp, S., Weiß, A.: QuickMergesort: practically efficient constant-factor optimal sorting, preprint available at arXiv.org/abs/1804.10062

  16. Floyd, R.W., Rivest, R.L.: Expected time bounds for selection. Commun. ACM 18(3), 165–172 (1975)

    Article  Google Scholar 

  17. Fussenegger, F., Gabow, H.N.: A counting approach to lower bounds for selection problems. J. ACM 26(2), 227–238 (1979)

    Article  MathSciNet  Google Scholar 

  18. Hadian, A., Sobel, M.: Selecting the \(t\)-th largest using binary errorless comparisons. Comb. Theory Appl. 4, 585–599 (1969)

    MATH  Google Scholar 

  19. Hoare, C.A.R.: Algorithm 63 (PARTITION) and algorithm 65 (FIND). Commun. ACM 4(7), 321–322 (1961)

    Article  Google Scholar 

  20. Hyafil, L.: Bounds for selection. SIAM J. Comput. 5(1), 109–114 (1976)

    Article  MathSciNet  Google Scholar 

  21. John, J.W.: A new lower bound for the set-partitioning problem. SIAM J. Comput. 17(4), 640–647 (1988)

    Article  MathSciNet  Google Scholar 

  22. Kaplan, H., Kozma, L., Zamir, O., Zwick, U.: Selection from heaps, row-sorted matrices and X+Y using soft heaps (2018, preprint). http://arXiv.org/abs/1802.07041

  23. Kirkpatrick, D.G.: A unified lower bound for selection and set partitioning problems. J. ACM 28(1), 150–165 (1981)

    Article  MathSciNet  Google Scholar 

  24. Knuth, D.E.: The Art of Computer Programming, Volume 3: Sorting and Searching, 2nd edn. Addison-Wesley, Reading (1998)

    Google Scholar 

  25. Mitzenmacher, M., Upfal, E.: Probability and Computing: Randomized Algorithms and Probabilistic Analysis. Cambridge University Press, Cambridge (2005)

    Book  Google Scholar 

  26. Motwani, R., Raghavan, P.: Randomized Algorithms. Cambridge University Press, Cambridge (1995)

    Book  Google Scholar 

  27. Paterson, M.: Progress in selection. In: Karlsson, R., Lingas, A. (eds.) SWAT 1996. LNCS, vol. 1097, pp. 368–379. Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-61422-2_146

    Chapter  Google Scholar 

  28. Schönhage, A., Paterson, M., Pippenger, N.: Finding the median. J. Comput. Syst. Sci. 13(2), 184–199 (1976)

    Article  MathSciNet  Google Scholar 

  29. Yao, F.: On lower bounds for selection problems. Technical report MAC TR-121, Massachusetts Institute of Technology, Cambridge (1974)

    Google Scholar 

  30. Yap, C.K.: New upper bounds for selection. Commun. ACM 19(9), 501–508 (1976)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Adrian Dumitrescu .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Dumitrescu, A. (2019). Finding a Mediocre Player. In: Heggernes, P. (eds) Algorithms and Complexity. CIAC 2019. Lecture Notes in Computer Science(), vol 11485. Springer, Cham. https://doi.org/10.1007/978-3-030-17402-6_18

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-17402-6_18

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-17401-9

  • Online ISBN: 978-3-030-17402-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics