Abstract
We consider the problem of computing efficient strategies for searching in trees. As a generalization of the classical binary search for ordered lists, suppose one wishes to find a (unknown) specific node of a tree by asking queries to its arcs, where each query indicates the endpoint closer to the desired node. Given the likelihood of each node being the one searched, the objective is to compute a search strategy that minimizes the expected number of queries. Practical applications of this problem include file system synchronization and software testing. Here we present a linear time algorithm which is the first constant factor approximation for this problem. This represents a significant improvement over previous O(log n)-approximation.
Similar content being viewed by others
References
Adler, M., Maggs, B.: Protocols for asymmetric communication channels. J. Comput. Syst. Sci. 63(4), 573–596 (2001)
Adler, M., Demaine, E., Harvey, N., Patrascu, M.: Lower bounds for asymmetric communication channels and distributed source coding. In: Proceedings of the Seventeenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2006, Miami, Florida, USA, 22–26 January 2006. pp. 251–260. ACM Press, New York (2006)
Barkan, A., Kaplan, H.: Partial alphabetic trees. J. Algorithms 58(2), 81–103 (2006)
Ben-Asher, Y., Farchi, E., Newman, I.: Optimal search in trees. SIAM J. Comput. 28(6), 2090–2102 (1999)
Carmo, R., Donadelli, J., Kohayakawa, Y., Laber, E.: Searching in random partially ordered sets. Theor. Comput. Sci. 321(1), 41–57 (2004)
Chakaravarthy, V., Pandit, V., Roy, S., Awasthi, P., Mohania, M.: Decision trees for entity identification: Approximation algorithms and hardness results. In: Proceedings of the Twenty-Sixth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (PODS), Beijing, China, 11–13 June 2007, pp. 53–62. ACM, New York (2007)
de Prisco, R., de Santis, A.: On binary search trees. Inf. Process. Lett. 45(5), 249–253 (1993)
Douïeb, K., Langerman, S.: Near-entropy hotlink assignments. In: Azar, Y., Erlebach, T. (eds.) Algorithms—ESA 2006, Proceedings of 14th Annual European Symposium, Zurich, Switzerland, 11–13 September 2006. Lecture Notes in Computer Science, vol. 4168, pp. 292–303. Springer, Berlin (2006)
Gallager, R.: Information Theory and Reliable Communication. Wiley, New York (1968)
Ghazizadeh, S., Ghodsi, M., Saberi, A.: A new protocol for asymmetric communication channels: Reaching the lower bounds. Scientia Iranica 8(4) (2001)
Golin, M., Kenyon, C., Young, N.: Huffman coding with unequal letter costs. In: Proceedings of 34th Annual ACM Symposium on Theory of Computing, Montréal, Québec, Canada, 19–21 May 2002, pp. 785–791. ACM, New York (2002)
Karp, R.: Minimum-redundancy coding for the discrete noiseless channel. IRE Trans. Inf. Theory 7(1), 27–38 (1961)
Knight, W.: Search in an ordered array having variable probe cost. SIAM J. Comput. 17(6), 1203–1214 (1988)
Knuth, D.: The Art of Computer Programming, vol. 3: Sorting and Searching. Addison-Wesley/Longman, Redwood City (1998)
Kosaraju, R., Przytycka, T., Borgstrom, R.: On an optimal split tree problem. In: Dehne, F.K.H.A., Gupta, A., Sack, J.-R., Tamassia, R. (eds.) Proceedings of 6th International Workshop on Algorithms and Data Structures, WADS ’99, Vancouver, British Columbia, Canada, 11–14 August 1999. Lecture Notes in Computer Science, vol. 1663, pp. 157–168. Springer, Berlin (1999)
Laber, E., Holanda, L.: Improved bounds for asymmetric communication protocols. Inf. Process. Lett. 83(4), 205–209 (2002)
Laber, E., Nogueira, L.: On the hardness of the minimum height decision tree problem. Discrete Appl. Math. 144(1–2), 209–212 (2004)
Laber, E., Milidiú, R., Pessoa, A.: Strategies for searching with different access costs. In: Nesetril, J. (ed.) Proceedings of 7th Annual European Symposium, Algorithms—ESA ’99, Prague, Czech Republic, 16–18 July 1999. Lecture Notes in Computer Science, vol. 1643, pp. 236–247. Springer, Berlin (1999)
Laber, E., Milidiú, R., Pessoa, A.: On binary searching with non-uniform costs. In: Proceedings of the Twelfth Annual Symposium on Discrete Algorithms, Washington, DC, USA, 7–9 January 2001, pp. 855–864. ACM/SIAM, New York/Philadelphia (2001)
Lipman, M., Abrahams, J.: Minimum average cost testing for partially ordered components. IEEE Trans. Inf. Theory 41(1), 287–291 (1995)
Mozes, S., Onak, K., Weimann, O.: Finding an optimal tree searching strategy in linear time. In: Teng, S.-H. (ed.) Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2008, San Francisco, California, USA, 20–22 January 2008, pp. 1096–1105. SIAM, Philadelphia (2008)
Navarro, G., Baeza-Yates, R., Barbosa, E., Ziviani, N., Cunto, W.: Binary searching with nonuniform costs and its application to text retrieval. Algorithmica 27(2), 145–169 (2000)
Onak, K., Parys, P.: Generalization of binary search: Searching in trees and forest-like partial orders. In: Proceedings of 47th Annual IEEE Symposium on Foundations of Computer Science, Berkeley, California, USA, 21–24 October, 2006. pp. 379–388. IEEE Computer Society, Los Alamitos (2006)
Szwarcfiter, J., Navarro, G., Baeza-Yates, R., de S. Oliveira, J., Cunto, W., Ziviani, N.: Optimal binary search trees with costs depending on the access paths. Theor. Comput. Sci. 290(3), 1799–1814 (2003)
Watkinson, J., Adler, M., Fich, F.: New protocols for asymmetric communication channels. In: Comellas, F., Fàbrega, J., Fraigniaud, P. (eds.) Proceedings of the 8th International Colloquium on Structural Information and Communication Complexity (SIROCCO 8), Vall de Núria, Girona–Barcelona, Catalonia, Spain, 27–29 June 2001. Proceedings in Informatics, vol. 8, pp. 337–350. Carleton Scientific (2001)
Author information
Authors and Affiliations
Corresponding author
Additional information
Preliminary version of this paper appeared in ICALP 2008.
The first author was partially supported by CNPq (Proc. 304786/2006-3 and 470654/2007-4), and by FAPERJ (Proj. E-26/100.505/2007).
Rights and permissions
About this article
Cite this article
Laber, E., Molinaro, M. An Approximation Algorithm for Binary Searching in Trees. Algorithmica 59, 601–620 (2011). https://doi.org/10.1007/s00453-009-9325-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00453-009-9325-0