Skip to main content
Log in

The Generalized Definitions of the Two-Dimensional Largest Common Substructure Problems

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

The similarity of two one-dimensional sequences is usually measured by the longest common subsequence (LCS) algorithms. However, these algorithms cannot be directly extended to solve the two or higher dimensional data. Thus, for the two-dimensional data, computing the similarity with an LCS-like approach remains worthy of investigation. In this paper, we utilize a systematic way to give the generalized definition of the two-dimensional largest common substructure (TLCS) problem by referring to the traditional LCS concept. With various matching rules, eight possible versions of TLCS problems may be defined. However, only four of them are shown to be valid. We prove that all of these four TLCS problems are \({\mathcal {NP}}\)-hard and \({\mathcal {APX}}\)-hard. To accomplish the proofs, two of the TLCS problems are reduced from the 3-satisfiability problem, and the other two are reduced from the 3-dimensional matching problem.

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
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

References

  1. Amaldi, E., Kann, V.: The complexity and approximability of finding maximum feasible subsystems of linear relations. Theor. Comput. Sci. 147(1–2), 181–210 (1995)

    MathSciNet  MATH  Google Scholar 

  2. Amir, A., Hartman, T., Kapah, O., Shalom, B.R., Tsur, D.: Generalized LCS. Theor. Comput. Sci. 409(3), 438–449 (2008)

    MathSciNet  MATH  Google Scholar 

  3. Ann, H.Y., Yang, C.B., Tseng, C.T., Hor, C.Y.: A fast and simple algorithm for computing the longest common subsequence of run-length encoded strings. Inf. Process. Lett. 108(6), 360–364 (2008)

    MathSciNet  MATH  Google Scholar 

  4. Arora, S.: Polynomial time approximation schemes for euclidean traveling salesman and other geometric problems. JACM 45(5), 753–782 (1998)

    MathSciNet  MATH  Google Scholar 

  5. Ausiello, G., Crescenzi, P., Gambosi, G., Kann, V., Marchetti-Spaccamela, A., Protasi, M.: Complexity and Approximation: Combinatorial Optimization Problems and Their Approximability Properties. Springer, Berlin (2012)

    MATH  Google Scholar 

  6. Baeza-Yates, R.A.: Similarity in two-dimensional strings. In: International Computing and Combinatorics Conference, pp. 319–328. Springer, Berlin (1998)

  7. Bird, R.S.: Two dimensional pattern matching. Inf. Process. Lett. 6(5), 168–170 (1977)

    Google Scholar 

  8. Branden, C.I., et al.: Introduction to Protein Structure. Garland Science, New York (1999)

    Google Scholar 

  9. Chang, S., Li, Y.: Representation of multi-resolution symbolic and binary pictures using 2D H-strings. In: IEEE Workshop on Languages for Automation: Symbiotic and Intelligent Robots, 1988, pp. 190–195. IEEE (1988)

  10. Chang, S.K., Jungert, E., Li, Y.: Representation and retrieval of symbolic pictures using generalized 2D strings. In: 1989 Symposium on Visual Communications, Image Processing, and Intelligent Robotics Systems, pp. 1360–1372. International Society for Optics and Photonics (1989)

  11. Chang, S.K., Shi, Q.Y., Yan, C.W.: Iconic indexing by 2-D strings. IEEE Trans. Pattern Anal. Mach. Intell. 3, 413–428 (1987)

    Google Scholar 

  12. Chang, S.K., Yan, C., Dimitroff, D.C., Arndt, T.: An intelligent image database system. IEEE Trans. Softw. Eng. 14(5), 681–688 (1988)

    Google Scholar 

  13. Cook, S.A.: The complexity of theorem-proving procedures. In: Proceedings of the 3rd Annual ACM Symposium on Theory of Computing, pp. 151–158. ACM (1971)

  14. Crescenzi, P., Panconesi, A.: Completeness in approximation classes. Inf. Comput. 93(2), 241–262 (1991)

    MathSciNet  MATH  Google Scholar 

  15. Galbiati, G., Maffioli, F., Morzenti, A.: A short note on the approximability of the maximum leaves spanning tree problem. Inf. Process. Lett. 52(1), 45–49 (1994)

    MathSciNet  MATH  Google Scholar 

  16. Guan, D., Chou, C.Y., Chen, C.W.: Computational complexity of similarity retrieval in a pictorial database. Inf. Process. Lett. 75(3), 113–117 (2000)

    MathSciNet  MATH  Google Scholar 

  17. Hirschberg, D.S.: A linear space algorithm for computing maximal common subsequences. Commun. ACM 18(6), 341–343 (1975)

    MathSciNet  MATH  Google Scholar 

  18. Huang, K.S., Yang, C.B., Tseng, K.T., Ann, H.Y., Peng, Y.H.: Efficient algorithms for finding interleaving relationship between sequences. Inf. Process. Lett. 105(5), 188–193 (2008)

    MathSciNet  MATH  Google Scholar 

  19. Huang, K.S., Yang, C.B., Tseng, K.T., Peng, Y.H., Ann, H.Y.: Dynamic programming algorithms for the mosaic longest common subsequence problem. Inf. Process. Lett. 102(2–3), 99–103 (2007)

    MathSciNet  MATH  Google Scholar 

  20. Hunt, J.W., Szymanski, T.G.: A fast algorithm for computing longest common subsequences. Commun. ACM 20(5), 350–353 (1977)

    MathSciNet  MATH  Google Scholar 

  21. Iliopoulos, C.S., Rahman, M.S.: Algorithms for computing variants of the longest common subsequence problem. Theor. Comput. Sci. 395(2–3), 255–267 (2008)

    MathSciNet  MATH  Google Scholar 

  22. Jansen, T.: Introduction to the theory of complexity and approximation algorithms. In: Mayr, E.W., Prömel, H.J., Steger, A. (eds.) Lectures on Proof Verification and Approximation Algorithms, pp. 5–28. Springer, Berlin (1998)

    Google Scholar 

  23. Kann, V.: Maximum bounded 3-dimensional matching is MAX SNP-complete. Inf. Process. Lett. 37(1), 27–35 (1991)

    MathSciNet  MATH  Google Scholar 

  24. Karp, R.M.: Reducibility among combinatorial problems. In: Proceedings of a Symposium on the Complexity of Computer Computations, pp. 85–103. IBM Thomas J. Watson Research Center, Yorktown Heights, New York (1972)

  25. Knuth, D.E., Morris Jr., J.H., Pratt, V.R.: Fast pattern matching in strings. SIAM J. Comput. 6(2), 323–350 (1977)

    MathSciNet  MATH  Google Scholar 

  26. Krithivasan, K., Sitalakshmi, R.: Efficient two-dimensional pattern matching in the presence of errors. Inf. Sci. 43(3), 169–184 (1987)

    Google Scholar 

  27. Lee, S.Y., Hsu, F.J.: 2D C-string: a new spatial knowledge representation for image database systems. Pattern Recognit. 23(10), 1077–1087 (1990)

    Google Scholar 

  28. Lee, S.Y., Hsu, F.J.: Spatial reasoning and similarity retrieval of images using 2D C-string knowledge representation. Pattern Recognit. 25(3), 305–318 (1992)

    Google Scholar 

  29. Lee, S.Y., Shan, M.K., Yang, W.P.: Similarity retrieval of iconic image database. Pattern Recognit. 22(6), 675–682 (1989)

    Google Scholar 

  30. Papadimitriou, C.H., Yannakakis, M.: Optimization, approximation, and complexity classes. J. Comput. Syst. Sci. 43(3), 425–440 (1991)

    MathSciNet  MATH  Google Scholar 

  31. Pawlik, M., Augsten, N.: RTED: a robust algorithm for the tree edit distance. Proc. VLDB Endow. 5(4), 334–345 (2011)

    Google Scholar 

  32. Peng, Y.H., Yang, C.B., Huang, K.S., Tseng, C.T., Hor, C.Y.: Efficient sparse dynamic programming for the merged lcs problem with block constraints. Int. J. Innov. Comput. Inf. Control 6(4), 1935–1947 (2010)

    Google Scholar 

  33. Schaefer, T.J.: The complexity of satisfiability problems. In: Proceedings of the 10th Annual ACM Symposium on Theory of Computing, pp. 216–226. ACM (1978)

  34. Tamura, H., Yokoya, N.: Image database systems: a survey. Pattern Recognit. 17(1), 29–43 (1984)

    Google Scholar 

  35. Tanimoto, S.L.: An iconic/symbolic data structuring scheme. In: Pattern Recognition and Artificial Intelligence, pp. 452–471 (1976)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Chang-Biau Yang.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This research work was partially supported by the Ministry of Science and Technology of Taiwan under Contract MOST 104-2221-E-110-018-MY3. And, it was also partially supported by the “Online and Offline Integrated Smart Commerce Platform (3/4)” of the Institute for Information Industry, which is subsidized by the Ministry of Economy Affairs of Taiwan.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Chan, HT., Chiu, HT., Yang, CB. et al. The Generalized Definitions of the Two-Dimensional Largest Common Substructure Problems. Algorithmica 82, 2039–2062 (2020). https://doi.org/10.1007/s00453-020-00685-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00453-020-00685-8

Keywords

Navigation