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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Akutsu T (2010) Tree edit distance problems: Algorithms and applications to bioinformatics. IEICE Transactions on Information and Systems E93.D(2):208–218
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
Akutsu T, Fukagawa D, Takasu A (2010) Approximating tree edit distance through string edit distance. Algorithmica 57(2):325–348
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
Akutsu T, Jansson J, Li R, Takasu A, Tamura T (2021) New and improved algorithms for unordered tree inclusion. Theoretical Computer Science In press
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)
Alonso L, Schott R (2001) On the tree inclusion problem. Acta Informatica 37(9):653–670
Bellman R (1957) Dynamic Programming. Princeton University Press, Princeton NJ
Bellman R, Dreyfus SE (1962) Applied Dynamic Programming. Princeton University Press, Princeton NJ
Bentley JL, Haken D, Saxe JB (1980) A general method for solving divide-and-conquer recurrences. ACM SIGACT News 12(3):36–44
Bitner JR, Reingold EM (1975) Backtrack programming techniques. Communications of the ACM 18(11):651–656
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
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
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)
Cormen TH, Leiserson CE, Rivest RL, Stein C (2009) Introduction to Algorithms, 3rd edn. MIT Press, Cambridge MA
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
Dreyfus SE, Law AM (1977) The Art and Theory of Dynamic Programming. Academic Press, New York NY
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)
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)
Dulucq S, Touzet H (2005) Decomposition algorithms for the tree edit distance problem. Journal of Discrete Algorithms 3(2–4):448–471
Golomb SW, Baumert LD (1965) Backtrack programming. Journal of the ACM 12(4):516–524
Graham RL, Knuth DE, Patashnik O (1994) Concrete Mathematics: A Foundation for Computer Science, 2nd edn. Addison-Wesley, Reading MA
Held M, Karp RM (1962) A dynamic programming approach to sequencing problems. J. SIAM 10(1):196–210
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
Kao M (1997) Multiple-size divide-and-conquer recurrences. ACM SIGACT News 28(2):67–69
Kilpeläinen P, Mannila H (1995) Ordered and unordered tree inclusion. SIAM Journal on Computing 24(2):340–356
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)
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)
Knuth DE, Moore RW (1975) Estimating the efficiency of backtrack programs. Mathematics of Computation 29(1):121–136
Lawler EL, Wood DE (1966) Branch-and-bound methods: A survey. Operations Research 14(1):699–719
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
Micheli A, Rossin D (2006) Edit distance between unlabeled ordered trees. RAIRO Theoretical Informatics and Applications 40(4):593–609
Miller W, Myers EW (1985) A file comparison program. Software: Practice and Experience 15(11):1025–1040
Mlinarić D, Milašinović B, Mornar V (2020) Tree inheritance distance. IEEE. Access 8(1):52489–52504
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
Myers EW (1986) An \({O}(nd)\) difference algorithm and its variations. Algorithmica 1(2):251–266
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)
Page RDM, Valiente G (2005) An edit script for taxonomic classifications. BMC Bioinformatics 6:208
Pawlik M, Augsten N (2011) RTED: A robust algorithm for the tree edit distance. Proceedings of the VLDB Endowment 5(4):334–345
Pawlik M, Augsten N (2015) Efficient computation of the tree edit distance. ACM Transactions on Database Systems 40(1):3:1–3:40
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)
Purdom PW, Brown CA (1985) The Analysis of Algorithms. Holt, Rinehart, and Winston, New York NY
Reingold EM, Nievergelt J, Deo NJ (1977) Combinatorial Algorithms: Theory and Practice. Prentice Hall, Englewood Cliffs NJ
Roura S (2001) Improved master theorems for divide-and-conquer recurrences. Journal of the ACM 48(2):170–205
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)
Sedgewick R, Flajolet P (1996) Analysis of Algorithms. Addison-Wesley, Reading MA
Selkow SM (1977) The tree-to-tree editing problem. Information Processing Letters 6(6):184–186
Shasha D, Zhang K (1990) Fast algorithms for the unit cost editing distance between trees. Journal of Algorithms 11(4):581–621
Tai KC (1979) The tree-to-tree correction problem. Journal of the ACM 26(3):422–433
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
Tanaka E, Tanaka K (1988) The tree-to-tree editing problem. International Journal of Pattern Recognition and Artificial Intelligence 2(2):221–240
Tsur D (2008) Faster algorithms for guided tree edit distance. Information Processing Letters 108(4):251–254
Valiente G (2005) Constrained tree inclusion. Journal of Discrete Algorithms 3(2–4):431–447
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)
Verma RM (1994) A general method and a master theorem for divide-and-conquer recurrences with applications. Journal of Algorithms 16(1):67–79
Verma RM (1997) General techniques for analyzing recursive algorithms with applications. SIAM Journal on Computing 26(2):568–581
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
Wang L, Zhang K (2008) Space efficient algorithms for ordered tree comparison. Algorithmica 51(3):283–297
Wang X, Fu Q (1996) A frame for general divide-and-conquer recurrences. Information Processing Letters 59(1):45–51
Wilhelm R (1981) A modified tree-to-tree correction problem. Information Processing Letters 12(3):127–132
Wu S, Manber U, Myers G, Miller W (1990) \({O}({NP})\) sequence comparison algorithm. Information Processing Letters 35(6):317–323
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
Yang W (1991) Identifying syntactic differences between two programs. Software: Practice and Experience 21(7):739–755
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
Yoshino T, Hirata K (2017) Tai mapping hierarchy for rooted labeled trees through common subforest. Theory of Computing Systems 60(4):759–783
Zhang K (1995) Algorithms for the constrained editing distance between ordered labeled trees and related problems. Pattern Recognition 28(3):463–474
Zhang K (1996) A constrained edit distance between unordered labeled trees. Algorithmica 15(3):205–222
Zhang K, Jiang T (1994) Some MAX SNP-hard results concerning unordered labeled trees. Information Processing Letters 49(5):249–254
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
Zhang K, Statman R, Shasha D (1992) On the editing distance between unordered labeled trees. Information Processing Letters 42(3):133–139
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
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Copyright information
© 2021 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
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)