Skip to main content

Subcaterpillar Isomorphism: Subtree Isomorphism for Rooted Labeled Caterpillars

  • Conference paper
  • First Online:
Recent Advances in Computational Optimization (WCO 2022)

Part of the book series: Studies in Computational Intelligence ((SCI,volume 1158))

Included in the following conference series:

  • 11 Accesses

Abstract

A subtree isomorphism, which is one of the pattern matching for rooted labeled trees (trees, for short), is the problem of determining whether or not, for a pattern tree P, there exists a subtree in a text tree T which is isomorphic to P. In this paper, we investigate the subtree isomorphism when P is a rooted labeled caterpillar (caterpillar, for short), which we call a subcaterpillar isomorphism of P in T. First, we investigate the subcaterpillar isomorphism when T is a tree. Then, we design two algorithms CatTreeIso and CatTreeIso2 to solve the subcaterpillar isomorphism of P in T and show that the algorithm CatTreeIso runs in \(O(tDh\sigma )\) time and O(Dh) space and the algorithm CatTreeIso2 runs in \(O(tD\sigma )\) time and \(O(D(h+H))\) space, respectively. Here, t is the number of vertices in T, h is the height of P, H is the height of T, \(\sigma \) is the number of alphabets for labels and D is the degree of T. Next, we investigate the subcaterpillar isomorphism when T is a caterpillar, which we call a subcaterpillar isomorphism between caterpillars. Then, by simplifying the algorithms CatTreeIso and CatTreeIso2, we design two algorithms CatCatIso and CatCatIso2 to solve the subcaterpillar isomorphism between caterpillars of P in T. Then, we show that both algorithms run \(O(hH\sigma )\) time and O(h) space. Finally, by implementing the algorithms CatTreeIso, CatTreeIso2, CatCatIso and CatCatIso2, we give experimental results of the subcaterpillar isomorphism and the subcaterpillar isomorphism between caterpillars for both artificial and real data.

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

Access this chapter

Institutional subscriptions

Notes

  1. 1.

    We assume that an injection and a bijection in Definition 1 are total, that is, \(f(v)\in V(T)\) for every \(v\in V(S)\).

  2. 2.

    For the representation of the backbones \( bb (P)=\langle v_1,\ldots ,v_m\rangle \) and \( bb (T)=\langle w_1,\ldots ,w_n\rangle \), we assume that \(v_m=r(P)\) and \(w_n=r(T)\) in the algorithm CatCatInc in Algorithm 1, whereas we assume that \(v_1=r(P)\) and \(w_1=r(T)\) in the original algorithm in [7].

  3. 3.

    Kyoto Encyclopedia of Genes and Genomes, http://www.kegg.jp/.

  4. 4.

    http://www.cs.rpi.edu/~zaki/www-new/pmwiki.php/Software/Software.

  5. 5.

    http://dblp.uni-trier.de/.

  6. 6.

    http://aiweb.cs.washington.edu/research/projects/xmltk/xmldata/www/repository.html.

References

  1. Abboud, A., Backurs, A., Hansen, T.D., Williams, V.V., Zamir, O.: Subtree isomorphism revisited. ACM Trans. Algo. 14, 27 (2018). https://doi.org/10.1145/3093239

  2. Deza, M.M., Deza, E.: Encyclopedia of Distances, 4th edn. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-52844-0

  3. Gallian, J.A.: A dynamic survey of graph labeling. Electorn. J. Combin., DS6 (2018)

    Google Scholar 

  4. Hopcroft, J.E., Karp, R.M.: An \(n^{5/2}\) algorithm for maximum matching in bipartite graphs. SIAM J. Comput. 2, 225–231 (1973). https://doi.org/10.1137/10.1137/0202019

  5. Kilpeläinen, P., Mannila, H.: Ordered and unordered tree inclusion. SIAM J. Comput. 24, 340–356 (1995). https://doi.org/10.1137/S0097539791218202

    Article  MathSciNet  Google Scholar 

  6. Matous̆ek, J., Thomas, R.: On the complexity of finding iso- and other morphisms for partial \(k\)-trees. Discrete Math. 108, 343–364 (1992). https://doi.org/10.1016/0012-365X(92)90687-B

  7. Miyazaki, T., Hagihara, M., Hirata, K.: Caterpillar inclusion: inclusion problem for rooted labeled caterpillars. In: Proceedings of the ICPRAM 2022, pp. 280–287 (2022). https://doi.org/10.5220/0010826300003122

  8. Shamir, R., Tsur, D.: Faster subtree isomorphism. J. Algo. 33, 267–280 (1999). https://doi.org/10.1006/jagm.1999.1044

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kouichi Hirata .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

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

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Miyazaki, T., Hirata, K. (2024). Subcaterpillar Isomorphism: Subtree Isomorphism for Rooted Labeled Caterpillars. In: Fidanova, S. (eds) Recent Advances in Computational Optimization. WCO 2022. Studies in Computational Intelligence, vol 1158. Springer, Cham. https://doi.org/10.1007/978-3-031-57320-0_7

Download citation

Publish with us

Policies and ethics