Skip to main content
Log in

Improved Approximation Algorithms for the Average-Case Tree Searching Problem

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

We study the following tree search problem: in a given tree T=(V,E) a vertex has been marked and we want to identify it. In order to locate the marked vertex, we can use edge queries. An edge query e asks in which of the two connected components of Te the marked vertex lies. The worst-case scenario where one is interested in minimizing the maximum number of queries is well understood, and linear time algorithms are known for finding an optimal search strategy. Here we study the more involved average-case analysis: A function w:V→ℝ+ is given which measures the likelihood for a vertex to be the one marked, and we seek to determine the strategy (decision tree) that minimizes the weighted average number of queries.

In a companion paper we prove that the above tree search problem is \(\mathcal {NP}\)-complete even for the class of trees of bounded diameter or bounded degree. Here, we match this complexity result with a tight algorithmic analysis of the bounded degree instances. We show that any optimal strategy (i.e., one that minimizes the weighted average number of queries) performs at most O(Δ(T)(log|V|+log(w(T)/w min))) queries in the worst case, where w(T) is the sum of the likelihoods of the vertices of T, w min is the minimum positive likelihood over the vertices of T and Δ(T) is the maximum degree of T. We combine this result with a non-trivial exponential time algorithm to provide an FPTAS for trees with bounded degree. We also show that for unbounded instances a natural greedy strategy attains a 1.62-approximation, improving upon the best known 14-approximation guarantee, previously provided by two of the authors.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Algorithm 1
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. Note that we have been using the term subtree to refer to the tree induced by a vertex and all its descendants. Here, however, T′ refers to any subtree.

  2. Such restrictions are search trees like \(D^{*}_{L}, D^{*}_{R}, D^{*}_{\mathit{RR}}, D^{*}_{\mathit{RL}}\).

  3. In fact, it can be shown that \(D^{*}_{m}\) is an optimal search tree for T m .

References

  1. Abrahams, J.: Code and parse trees for lossless source encoding. In: Proceedings of the Compression and Complexity of Sequences 1997, SEQUENCES’97, pp. 145–171. IEEE Comput. Soc., Washington (1997)

    Google Scholar 

  2. Adler, M., Demaine, E.D., Harvey, N.J.A., Pǎtraşcu, M.: Lower bounds for asymmetric communication channels and distributed source coding. In: Proceedings of the 17th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA’06, pp. 251–260. ACM, New York (2006)

    Google Scholar 

  3. Adler, M., Heeringa, B.: Approximating optimal binary decision trees. In: Proceedings of the 11th International Workshop, APPROX 2008, and 12th International Workshop, RANDOM 2008 on Approximation, Randomization and Combinatorial Optimization: Algorithms and Techniques, APPROX’08/RANDOM’08, pp. 1–9. Springer, Berlin (2008)

    Google Scholar 

  4. Adler, M., Maggs, B.: Protocols for asymmetric communication channels. J. Comput. Syst. Sci. 63(4), 573–596 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  5. Arkin, E., Meijer, H., Mitchell, J., Rappaport, D., Skiena, S.: Decision trees for geometric models. Int. J. Comput. Geom. Appl. 8(3), 343–364 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  6. Ben-Asher, Y., Farchi, E., Newman, I.: Optimal search in trees. SIAM J. Comput. 28(6), 2090–2102 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  7. Chakaravarthy, V.T., Pandit, V., Roy, S., Awasthi, P., Mohania, M.K.: Decision trees for entity identification: approximation algorithms and hardness results. ACM Trans. Algorithms 15, 1 (2011)

    Article  MathSciNet  Google Scholar 

  8. Cicalese, F., Jacobs, T., Laber, E., Molinaro, M.: On greedy algorithms for decision trees. In: Proceedings of the 21st International Symposium on Algorithms and Computation (ISAAC 2010). Lecture Notes in Computer Science, vol. 6507, pp. 206–217. Springer, Berlin (2010)

    Google Scholar 

  9. Cicalese, F., Jacobs, T., Laber, E.S., Molinaro, M.: On the complexity of searching in trees and partially ordered structures. Theor. Comput. Sci. 412, 6879–6896 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  10. Daskalakis, C., Karp, R.M., Mossel, E., Riesenfeld, S.J., Verbin, E.: Sorting and selection in posets. SIAM J. Comput. 40(3), 597–622 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  11. de la Torre, P., Greenlaw, R., Schäffer, A.: Optimal edge ranking of trees in polynomial time. Algorithmica 13(6), 592–618 (1995)

    Article  MATH  MathSciNet  Google Scholar 

  12. Dereniowski, D.: Edge ranking and searching in partial orders. Discrete Appl. Math. 156(13), 2493–2500 (2008)

    Article  MATH  MathSciNet  Google Scholar 

  13. Faigle, U., Lovász, L., Schrader, R., Turán, G.: Searching in trees, series-parallel and interval orders. SIAM J. Comput. 15(4), 1075–1084 (1986)

    Article  MATH  MathSciNet  Google Scholar 

  14. Garey, M.: Optimal binary identification procedures. SIAM J. Appl. Math. 23(2), 173–186 (1972)

    Article  MATH  MathSciNet  Google Scholar 

  15. Garsia, A., Wachs, M.: A new algorithm for minimum cost binary trees. SIAM J. Comput. 6(4), 622–642 (1977)

    Article  MATH  MathSciNet  Google Scholar 

  16. Ghazizadeh, S., Ghodsi, M., Saberi, A.: A new protocol for asymmetric communication channels: reaching the lower bounds. Sci. Iran. 8(4), 297–302 (2001)

    Google Scholar 

  17. Hu, T., Tucker, A.: Optimal computer search trees and variable-length alphabetic codes. SIAM J. Appl. Math. 21(4), 514–532 (1971)

    Article  MATH  MathSciNet  Google Scholar 

  18. Hyafil, L., Rivest, R.: Constructing optimal binary decision trees is NP-complete. Inf. Process. Lett. 5(1), 15–17 (1976)

    Article  MATH  MathSciNet  Google Scholar 

  19. Ibarra, O., Kim, C.: Fast approximation algorithms for the knapsack and sum of subset problems. J. ACM 22(4), 463–468 (1975)

    MATH  MathSciNet  Google Scholar 

  20. Iyer, A., Ratliff, H., Vijayan, G.: On an edge ranking problem of trees and graphs. Discrete Appl. Math. 30(1), 43–52 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  21. Jacobs, T., Cicalese, F., Laber, E., Molinaro, M.: On the complexity of searching in trees: average-case minimization. In: Proceedings of the 37th International Colloquium Conference on Automata, Languages and Programming, ICALP’10, pp. 527–539. Springer, Berlin (2010)

    Chapter  Google Scholar 

  22. Jacobs, T.: Analytical aspects of tie breaking. Theor. Comput. Sci. 465, 1–9 (2012)

    Article  MATH  MathSciNet  Google Scholar 

  23. Knuth, D.: The Art of Computer Programming. Vol. 3: Sorting and Searching. Addison-Wesley, Reading (1973)

    Google Scholar 

  24. Kosaraju, S.R., Przytycka, T.M., Borgstrom, R.S.: On an optimal split tree problem. In: Proceedings of the 6th International Workshop on Algorithms and Data Structures, WADS’99, pp. 157–168. Springer, London (1999)

    Chapter  Google Scholar 

  25. Laber, E., Holanda, L.: Improved bounds for asymmetric communication protocols. Inf. Process. Lett. 83(4), 205–209 (2002)

    Article  MATH  MathSciNet  Google Scholar 

  26. Laber, E., Molinaro, M.: An approximation algorithm for binary searching in trees. Algorithmica 59(4), 601–620 (2011)

    Article  MATH  MathSciNet  Google Scholar 

  27. Laber, E., Nogueira, L.: On the hardness of the minimum height decision tree problem. Discrete Appl. Math. 144(1–2), 209–212 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  28. Lam, T.W., Yue, F.L.: Optimal edge ranking of trees in linear time. In: Proceedings of the Ninth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA’98, pp. 436–445. Society for Industrial and Applied Mathematics, Philadelphia (1998)

    Google Scholar 

  29. Larmore, H., Hirschberg, D.S., Larmore, L.L., Molodowitch, M.: Subtree weight ratios for optimal binary search trees. Technical report 86-0200-2, Bren School of Information and Computer Science, UC Irvine (1986)

  30. Linial, N., Saks, M.: Searching ordered structures. J. Algorithms 6(1), 86–103 (1985)

    Article  MATH  MathSciNet  Google Scholar 

  31. Lipman, M., Abrahams, J.: Minimum average cost testing for partially ordered components. IEEE Trans. Inf. Theory 41(1), 287–291 (1995)

    Article  MATH  Google Scholar 

  32. Mozes, S., Onak, K., Weimann, O.: Finding an optimal tree searching strategy in linear time. In: Proceedings of the 19th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA’08, pp. 1096–1105. Society for Industrial and Applied Mathematics, Philadelphia (2008)

    Google Scholar 

  33. Onak, K., Parys, P.: Generalization of binary search: Searching in trees and forest-like partial orders. In: Proceedings of the 47th Annual IEEE Symposium on Foundations of Computer Science, FOCS’06, pp. 379–388. IEEE Comput. Soc., Washington (2006)

    Google Scholar 

  34. Schäffer, A.: Optimal node ranking of trees in linear time. Inf. Process. Lett. 33(2), 91–96 (1989)

    Article  MATH  Google Scholar 

  35. Watkinson, J., Adler, M., Fich, F.E.: New protocols for asymmetric communication channels. In: Proceedings of the 8th International Colloquium on Structural Information and Communication Complexity, SIROCCO. Proceedings in Informatics, vol. 8, pp. 337–350. Carleton Scientific, Kitchener (2001)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ferdinando Cicalese.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Cicalese, F., Jacobs, T., Laber, E. et al. Improved Approximation Algorithms for the Average-Case Tree Searching Problem. Algorithmica 68, 1045–1074 (2014). https://doi.org/10.1007/s00453-012-9715-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-012-9715-6

Keywords

Navigation