Skip to main content

Classification via Two-Way Comparisons (Extended Abstract)

  • Conference paper
  • First Online:
Algorithms and Data Structures (WADS 2023)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14079))

Included in the following conference series:

  • 571 Accesses

Abstract

Given a weighted, ordered query set Q and a partition of Q into classes, we study the problem of computing a minimum-cost decision tree that, given any query \(q\in Q\), uses equality tests and less-than comparisons to determine the class to which q belongs. Such a tree can be much smaller than a lookup table, and much faster and smaller than a conventional search tree. We give the first polynomial-time algorithm for the problem. The algorithm extends naturally to the setting where each query has multiple allowed classes.

Most proofs from Sects. 3 and 4 are omitted. See [6] for full proofs.

M. Chrobak—Research partially supported by National Science Foundation grant CCF-2153723.

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 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.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

References

  1. Anderson, R., Kannan, S., Karloff, H., Ladner, R.E.: Thresholds and optimal binary comparison search trees. J. Algorithms 44, 338–358 (2002). https://doi.org/10.1016/S0196-6774(02)00203-1

    Article  MathSciNet  MATH  Google Scholar 

  2. Chambers, C., Chen, W.: Efficient multiple and predicated dispatching. In: Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications (OOPSLA 1999), Denver, Colorado, USA, 1–5 November 1999, pp. 238–255 (1999)

    Google Scholar 

  3. Chambers, C., Chen, W.: Efficient multiple and predicated dispatching. SIGPLAN Not. 34(10), 238–255 (1999). https://doi.org/10.1145/320385.320407

    Article  Google Scholar 

  4. Chrobak, M., Golin, M., Munro, J.I., Young, N.E.: A simple algorithm for optimal search trees with two-way comparisons. ACM Trans. Algorithms 18(1), 2:1–2:11 (2021). https://doi.org/10.1145/3477910

  5. Chrobak, M., Golin, M., Munro, J.I., Young, N.E.: On Huang and Wong’s algorithm for generalized binary split trees. Acta Informatica 59(6), 687–708 (2022). https://doi.org/10.1007/s00236-021-00411-z

    Article  MathSciNet  MATH  Google Scholar 

  6. Chrobak, M., Young, N.E.: Classification via two-way comparisons (2023). https://doi.org/10.48550/ARXIV.2302.09692

  7. Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 4th edn. The MIT Press, Cambridge (2022)

    MATH  Google Scholar 

  8. Dagan, Y., Filmus, Y., Gabizon, A., Moran, S.: Twenty (simple) questions. In: Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, 19–23 June 2017, pp. 9–21 (2017). https://doi.org/10.1145/3055399.3055422

  9. Gilbert, E., Moore, E.: Variable-length binary encodings. Bell Syst. Tech. J. 38(4), 933–967 (1959). https://doi.org/10.1002/j.1538-7305.1959.tb01583.x

    Article  MathSciNet  Google Scholar 

  10. Hester, J.H., Hirschberg, D.S., Huang, S.H., Wong, C.K.: Faster construction of optimal binary split trees. J. Algorithms 7, 412–424 (1986). https://doi.org/10.1016/0196-6774(86)90031-3

    Article  MathSciNet  MATH  Google Scholar 

  11. Huang, S.H.S., Wong, C.K.: Generalized binary split trees. Acta Informatica 21(1), 113–123 (1984). https://doi.org/10.1007/BF00289143

    Article  MathSciNet  MATH  Google Scholar 

  12. Huang, S.H.S., Wong, C.K.: Optimal binary split trees. J. Algorithms 5, 69–79 (1984). https://doi.org/10.1016/0196-6774(84)90041-5

    Article  MathSciNet  MATH  Google Scholar 

  13. Hyafil, L., Rivest, R.L.: Constructing optimal binary decision trees is NP-complete. Inf. Process. Lett. 5(1), 15–17 (1976). https://doi.org/10.1016/0020-0190(76)90095-8

    Article  MathSciNet  MATH  Google Scholar 

  14. Knuth, D.E.: Optimum binary search trees. Acta Informatica 1, 14–25 (1971). https://doi.org/10.1007/BF00264289

    Article  MATH  Google Scholar 

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

    Google Scholar 

  16. Perl, Y.: Optimum split trees. J. Algorithms 5, 367–374 (1984). https://doi.org/10.1016/0196-6774(84)90017-8

    Article  MathSciNet  MATH  Google Scholar 

  17. Sheil, B.A.: Median split trees: a fast lookup technique for frequently occurring keys. Commun. ACM 21, 947–958 (1978). https://doi.org/10.1145/359642.359653

    Article  MathSciNet  MATH  Google Scholar 

  18. Spuler, D.: Optimal search trees using two-way key comparisons. Acta Informatica 31(8), 729–740 (1994). https://doi.org/10.1007/BF01178732

    Article  MATH  Google Scholar 

  19. Spuler, D.A.: Optimal search trees using two-way key comparisons. Ph.D. thesis, James Cook University (1994)

    Google Scholar 

Download references

Acknowledgements

Thanks to Mordecai Golin and Ian Munro for introducing us to the problem and for useful discussions.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Marek Chrobak .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Chrobak, M., Young, N.E. (2023). Classification via Two-Way Comparisons (Extended Abstract). In: Morin, P., Suri, S. (eds) Algorithms and Data Structures. WADS 2023. Lecture Notes in Computer Science, vol 14079. Springer, Cham. https://doi.org/10.1007/978-3-031-38906-1_19

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-38906-1_19

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-38905-4

  • Online ISBN: 978-3-031-38906-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics