Skip to main content

Algorithmic Techniques

  • Chapter
  • First Online:
Algorithms on Trees and Graphs

Part of the book series: Texts in Computer Science ((TCS))

  • 2630 Accesses

Abstract

Combinatorial problems on trees and graphs can be studied in the general framework of assigning values to nodes or vertices in such a way that some specified constraints are satisfied. Some of the basic algorithmic techniques for solving these problems—backtracking, branch-and-bound, divide-and-conquer, and dynamic programming—are presented in this chapter, and they are illustrated by the problem of computing the edit distance between two trees.

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 49.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 64.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 99.99
Price excludes VAT (USA)
  • Durable hardcover 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. Akutsu T (2010) Tree edit distance problems: Algorithms and applications to bioinformatics. IEICE Transactions on Information and Systems E93.D(2):208–218

    Article  Google Scholar 

  2. Akutsu T, Fukagawa D, Halldórsson MM, Takasu A, Tanaka K (2006) Approximation and parameterized algorithms for common subtrees and edit distance between unordered trees. Theoretical Computer Science 470(28):10–22

    MathSciNet  MATH  Google Scholar 

  3. Akutsu T, Fukagawa D, Takasu A (2010) Approximating tree edit distance through string edit distance. Algorithmica 57(2):325–348

    Article  MathSciNet  MATH  Google Scholar 

  4. Akutsu T, Fukagawa D, Takasu A, Tamura T (2011) Exact algorithms for computing the tree edit distance between unordered trees. Theoretical Computer Science 412(4–5):352–364

    Article  MathSciNet  MATH  Google Scholar 

  5. Akutsu T, Jansson J, Li R, Takasu A, Tamura T (2021) New and improved algorithms for unordered tree inclusion. Theoretical Computer Science In press

    Google Scholar 

  6. Alabbas, M., Ramsay, A.: Optimising tree edit distance with subtrees for textual entailment. In: R. Mitkov, G. Angelova, K. Bontcheva (eds.) Proc. Int. Conf. Recent Advances in Natural Language Processing RANLP 2013, pp. 9–17. INCOMA Ltd., Shoumen, Bulgaria (2013)

    Google Scholar 

  7. Alonso L, Schott R (2001) On the tree inclusion problem. Acta Informatica 37(9):653–670

    Article  MathSciNet  MATH  Google Scholar 

  8. Bellman R (1957) Dynamic Programming. Princeton University Press, Princeton NJ

    MATH  Google Scholar 

  9. Bellman R, Dreyfus SE (1962) Applied Dynamic Programming. Princeton University Press, Princeton NJ

    Book  MATH  Google Scholar 

  10. Bentley JL, Haken D, Saxe JB (1980) A general method for solving divide-and-conquer recurrences. ACM SIGACT News 12(3):36–44

    Article  MATH  Google Scholar 

  11. Bitner JR, Reingold EM (1975) Backtrack programming techniques. Communications of the ACM 18(11):651–656

    Article  MATH  Google Scholar 

  12. Boroujeni M, Ghodsi M, Hajiaghayi MT, Seddighin, S.:ACM, (2019) \(1+epsilon \) approximation of tree edit distance in quadratic time. In: Charikar M, Cohen E (eds). pp 709–720

    Google Scholar 

  13. Bringmann K, Gawrychowski P, Mozes S, Weimann O (2020) Tree edit distance cannot be computed in strongly subcubic time. ACM Transactions on Algorithms 16(4):48:1–48:22

    Article  MATH  Google Scholar 

  14. Chawathe, S.S.: Comparing hierarchical data in external memory. In: M.E.O. Malcolm P. Atkinson, P. Valduriez, S.B. Zdonik, M.L. Brodie (eds.) Proc. 25th Int. Conf. Very Large Data Bases, pp. 90–101. Morgan Kaufmann, New York NY (1999)

    Google Scholar 

  15. Cormen TH, Leiserson CE, Rivest RL, Stein C (2009) Introduction to Algorithms, 3rd edn. MIT Press, Cambridge MA

    MATH  Google Scholar 

  16. Demaine ED, Mozes S, Rossman B, Weimann O (2009) An optimal decomposition algorithm for tree edit distance. ACM Transactions on Algorithms 6(1):2:1–2:19

    Article  MathSciNet  MATH  Google Scholar 

  17. Dreyfus SE, Law AM (1977) The Art and Theory of Dynamic Programming. Academic Press, New York NY

    MATH  Google Scholar 

  18. Dudek, B., Gawrychowski, P.: Edit distance between unrooted trees in cubic time. In: I. Chatzigiannakis, C. Kaklamanis, D. Marx, D. Sannella (eds.) Proc. 45th Int. Colloq. Automata, Languages, and Programming, Leibniz International Proceedings in Informatics, vol. 107, pp. 45:1–45:14 (2018)

    Google Scholar 

  19. Dulucq, S., Touzet, H.: Analysis of tree edit distance algorithms. In: R. Baeza-Yates, E. Chávez, M. Crochemore (eds.) Proc. 14th Annual Symp. Combinatorial Pattern Matching, Lecture Notes in Computer Science, vol. 2676, pp. 83–95. Springer (2003)

    Google Scholar 

  20. Dulucq S, Touzet H (2005) Decomposition algorithms for the tree edit distance problem. Journal of Discrete Algorithms 3(2–4):448–471

    Article  MathSciNet  MATH  Google Scholar 

  21. Golomb SW, Baumert LD (1965) Backtrack programming. Journal of the ACM 12(4):516–524

    Article  MathSciNet  MATH  Google Scholar 

  22. Graham RL, Knuth DE, Patashnik O (1994) Concrete Mathematics: A Foundation for Computer Science, 2nd edn. Addison-Wesley, Reading MA

    MATH  Google Scholar 

  23. Held M, Karp RM (1962) A dynamic programming approach to sequencing problems. J. SIAM 10(1):196–210

    MathSciNet  MATH  Google Scholar 

  24. Horesh Y, Mehr R, Unger R (2006) Designing an A* algorithm for calculating edit distance between rooted-unordered trees. Journal of Computational Biology 13(6):1165–1176

    Article  MathSciNet  Google Scholar 

  25. Kao M (1997) Multiple-size divide-and-conquer recurrences. ACM SIGACT News 28(2):67–69

    Article  Google Scholar 

  26. Kilpeläinen P, Mannila H (1995) Ordered and unordered tree inclusion. SIAM Journal on Computing 24(2):340–356

    Article  MathSciNet  MATH  Google Scholar 

  27. Klein, P., Tirthapura, S., Sharvit, D., Kimia, B.: A tree-edit-distance algorithm for comparing simple, closed shapes. In: D. Shmoys (ed.) Proc. 11th Annual ACM-SIAM Symp. Discrete Algorithms, pp. 696–704. SIAM (2000)

    Google Scholar 

  28. Klein, P.N.: Computing the edit-distance between unrooted ordered trees. In: G. Bilardi, G.F. Italiano, A. Pietracaprina, G. Pucci (eds.) Proc. 6th Annual European Symp. Algorithms, Lecture Notes in Computer Science, vol. 1461, pp. 91–102. Springer, Berlin Heidelberg (1998)

    Google Scholar 

  29. Knuth DE, Moore RW (1975) Estimating the efficiency of backtrack programs. Mathematics of Computation 29(1):121–136

    Article  MathSciNet  MATH  Google Scholar 

  30. Lawler EL, Wood DE (1966) Branch-and-bound methods: A survey. Operations Research 14(1):699–719

    Article  MathSciNet  MATH  Google Scholar 

  31. Lu SY (1979) A tree-to-tree distance and its applications to cluster analysis. IEEE Transactions on Pattern Analysis and Machine Intelligence 1(2):219–224

    Article  MATH  Google Scholar 

  32. Micheli A, Rossin D (2006) Edit distance between unlabeled ordered trees. RAIRO Theoretical Informatics and Applications 40(4):593–609

    Article  MathSciNet  MATH  Google Scholar 

  33. Miller W, Myers EW (1985) A file comparison program. Software: Practice and Experience 15(11):1025–1040

    Google Scholar 

  34. Mlinarić D, Milašinović B, Mornar V (2020) Tree inheritance distance. IEEE. Access 8(1):52489–52504

    Article  Google Scholar 

  35. Mori T, Tamura T, Fukagawa D, Takasu A, Tomita E, Akutsu T (2012) A clique-based method using dynamic programming for computing edit distance between unordered trees. Journal of Computational Biology 19(10):1089–1104

    Article  MathSciNet  Google Scholar 

  36. Myers EW (1986) An \({O}(nd)\) difference algorithm and its variations. Algorithmica 1(2):251–266

    Article  MathSciNet  MATH  Google Scholar 

  37. Noetzel, A.S., Selkow, S.M.: An analysis of the general tree-editing problem. In: D. Sankoff, J.B. Kruskal (eds.) Time Warps, String Edits, and Macromolecules: The Theory and Practice of Sequence Comparison, chap. 8. Center for the Study of Language and Information, Stanford, California (1999)

    Google Scholar 

  38. Page RDM, Valiente G (2005) An edit script for taxonomic classifications. BMC Bioinformatics 6:208

    Article  Google Scholar 

  39. Pawlik M, Augsten N (2011) RTED: A robust algorithm for the tree edit distance. Proceedings of the VLDB Endowment 5(4):334–345

    Article  Google Scholar 

  40. Pawlik M, Augsten N (2015) Efficient computation of the tree edit distance. ACM Transactions on Database Systems 40(1):3:1–3:40

    Article  MathSciNet  Google Scholar 

  41. Peng, Z., Ting, H.F.: Guided forest edit distance: Better structure comparisons by using domain-knowledge. In: B. Ma, K. Zhang (eds.) Proc. 18th Annual Symp. Combinatorial Pattern Matching, Lecture Notes in Computer Science, vol. 4580, pp. 195–204. Springer (2007)

    Google Scholar 

  42. Purdom PW, Brown CA (1985) The Analysis of Algorithms. Holt, Rinehart, and Winston, New York NY

    MATH  Google Scholar 

  43. Reingold EM, Nievergelt J, Deo NJ (1977) Combinatorial Algorithms: Theory and Practice. Prentice Hall, Englewood Cliffs NJ

    MATH  Google Scholar 

  44. Roura S (2001) Improved master theorems for divide-and-conquer recurrences. Journal of the ACM 48(2):170–205

    Article  MathSciNet  MATH  Google Scholar 

  45. Schwarz, S., Pawlik, M., Augsten, N.: A new perspective on the tree edit distance. In: C. Beecks, F. Borutta, P. Kröger, T. Seidl (eds.) Proc. 10th Int. Conf. Similarity Search and Applications, Lecture Notes in Computer Science, vol. 10609, pp. 156–170. Springer (2017)

    Google Scholar 

  46. Sedgewick R, Flajolet P (1996) Analysis of Algorithms. Addison-Wesley, Reading MA

    MATH  Google Scholar 

  47. Selkow SM (1977) The tree-to-tree editing problem. Information Processing Letters 6(6):184–186

    Article  MathSciNet  MATH  Google Scholar 

  48. Shasha D, Zhang K (1990) Fast algorithms for the unit cost editing distance between trees. Journal of Algorithms 11(4):581–621

    Article  MathSciNet  MATH  Google Scholar 

  49. Tai KC (1979) The tree-to-tree correction problem. Journal of the ACM 26(3):422–433

    Article  MathSciNet  MATH  Google Scholar 

  50. Tanaka E (1994) A metric between unrooted and unordered trees and its bottom-up computing method. IEEE Transactions on Pattern Analysis and Machine Intelligence 16(12):1233–1238

    Article  Google Scholar 

  51. Tanaka E, Tanaka K (1988) The tree-to-tree editing problem. International Journal of Pattern Recognition and Artificial Intelligence 2(2):221–240

    Article  Google Scholar 

  52. Tsur D (2008) Faster algorithms for guided tree edit distance. Information Processing Letters 108(4):251–254

    Article  MathSciNet  MATH  Google Scholar 

  53. Valiente G (2005) Constrained tree inclusion. Journal of Discrete Algorithms 3(2–4):431–447

    Article  MathSciNet  MATH  Google Scholar 

  54. Valiente, G.: Efficient algorithms on trees and graphs with unique node labels. In: A. Kandel, H. Bunke, M. Last (eds.) Applied Graph Theory in Computer Vision and Pattern Recognition, Studies in Computational Intelligence, vol. 52, pp. 137–149. Springer (2007)

    Google Scholar 

  55. Verma RM (1994) A general method and a master theorem for divide-and-conquer recurrences with applications. Journal of Algorithms 16(1):67–79

    Article  MathSciNet  MATH  Google Scholar 

  56. Verma RM (1997) General techniques for analyzing recursive algorithms with applications. SIAM Journal on Computing 26(2):568–581

    Article  MathSciNet  MATH  Google Scholar 

  57. Walker RJ (1960) An enumerative technique for a class of combinatorial problems. In: Bellman R, Hall M (eds) Combinatorial Analysis, vol 10, chap. 7. American Mathematical Society, Providence, RI, pp 91–94

    Chapter  Google Scholar 

  58. Wang L, Zhang K (2008) Space efficient algorithms for ordered tree comparison. Algorithmica 51(3):283–297

    Article  MathSciNet  MATH  Google Scholar 

  59. Wang X, Fu Q (1996) A frame for general divide-and-conquer recurrences. Information Processing Letters 59(1):45–51

    Article  MathSciNet  MATH  Google Scholar 

  60. Wilhelm R (1981) A modified tree-to-tree correction problem. Information Processing Letters 12(3):127–132

    Article  MathSciNet  MATH  Google Scholar 

  61. Wu S, Manber U, Myers G, Miller W (1990) \({O}({NP})\) sequence comparison algorithm. Information Processing Letters 35(6):317–323

    Article  MathSciNet  MATH  Google Scholar 

  62. Yamamoto Y, Hirata K, Kuboyama T (2014) Tractable and intractable variations of unordered tree edit distance. International Journal of Foundations of Computer Science 25(3):307–329

    Article  MathSciNet  MATH  Google Scholar 

  63. Yang W (1991) Identifying syntactic differences between two programs. Software: Practice and Experience 21(7):739–755

    Google Scholar 

  64. Yoshino T, Higuchi S, Hirata K (2013). In: Hirokawa S, Hashimoto K (eds) A dynamic programming A* algorithm for computing unordered tree edit distance. IEEE, pp 135–140

    Google Scholar 

  65. Yoshino T, Hirata K (2017) Tai mapping hierarchy for rooted labeled trees through common subforest. Theory of Computing Systems 60(4):759–783

    Article  MathSciNet  MATH  Google Scholar 

  66. Zhang K (1995) Algorithms for the constrained editing distance between ordered labeled trees and related problems. Pattern Recognition 28(3):463–474

    Article  Google Scholar 

  67. Zhang K (1996) A constrained edit distance between unordered labeled trees. Algorithmica 15(3):205–222

    Article  MathSciNet  MATH  Google Scholar 

  68. Zhang K, Jiang T (1994) Some MAX SNP-hard results concerning unordered labeled trees. Information Processing Letters 49(5):249–254

    Article  MathSciNet  MATH  Google Scholar 

  69. Zhang K, Shasha D (1989) Simple fast algorithms for the editing distance between trees and related problems. SIAM Journal on Computing 18(6):1245–1262

    Article  MathSciNet  MATH  Google Scholar 

  70. Zhang K, Statman R, Shasha D (1992) On the editing distance between unordered labeled trees. Information Processing Letters 42(3):133–139

    Article  MathSciNet  MATH  Google Scholar 

  71. Zhang K, Wang JTL, Shasha D (1996) On the editing distance between undirected acyclic graphs. International Journal of Foundations of Computer Science 7(1):43–57

    Article  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Gabriel Valiente .

Rights and permissions

Reprints and permissions

Copyright information

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

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Valiente, G. (2021). Algorithmic Techniques. In: Algorithms on Trees and Graphs. Texts in Computer Science. Springer, Cham. https://doi.org/10.1007/978-3-030-81885-2_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-81885-2_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-81884-5

  • Online ISBN: 978-3-030-81885-2

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics