Constant Time Enumeration of Bounded-Size Subtrees in Trees and Its Application

  • Kunihiro Wasa
  • Yusaku Kaneta
  • Takeaki Uno
  • Hiroki Arimura
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7434)


By the motivation to discover patterns in massive structured data in the form of graphs and trees, we study a special case of the ksubtree enumeration problem, originally introduced by (Ferreira, Grossi, and Rizzi, ESA’11, 275-286, 2011), where an input graph is a tree of n nodes. Based on reverse search technique, we present the first constant delay enumeration algorithm that lists all k-subtrees of an input tree in O(1) worst-case time per subtree. This result improves on the straightforward application of Ferreira et al’s algorithm with O(k) amortized time per subtree when an input is restricted to tree. Finally, we discuss an application of our algorithm to a modification of the graph motif problem for trees.


Span Tree Parent Function Input Graph Family Tree Constant Delay 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abiteboul, S., Buneman, P., Suciu, D.: Data on the Web: From Relations to Semistructured Data and XML. Morgan Kaufmann (1999)Google Scholar
  2. 2.
    Asai, T., Abe, K., Kawasoe, S., Arimura, H., Sakamoto, H., Arikawa, S.: Efficient substructure discovery from large semi-structured data. In: SDM 2002 (2002)Google Scholar
  3. 3.
    Avis, D., Fukuda, K.: Reverse search for enumeration. Discrete Applied Mathematics 65, 21–46 (1993)MathSciNetCrossRefGoogle Scholar
  4. 4.
    Cormen, T.H., Leiserson, C.E., Rivest, R.L., Stein, C.: Introduction to Algorithms, 2nd edn. The MIT Press (2001)Google Scholar
  5. 5.
    Fellows, M., Fertin, G., Hermelin, D., Vialette, S.: Sharp Tractability Borderlines for Finding Connected Motifs in Vertex-Colored Graphs. In: Arge, L., Cachin, C., Jurdziński, T., Tarlecki, A. (eds.) ICALP 2007. LNCS, vol. 4596, pp. 340–351. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  6. 6.
    Ferreira, R., Grossi, R., Rizzi, R.: Output-Sensitive Listing of Bounded-Size Trees in Undirected Graphs. In: Demetrescu, C., Halldórsson, M.M. (eds.) ESA 2011. LNCS, vol. 6942, pp. 275–286. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  7. 7.
    Goldberg, L.A.: Polynomial space polynomial delay algorithms for listing families of graphs. In: Proceedings of the Twenty-Fifth Annual ACM Symposium on Theory of Computing, STOC 1993, pp. 218–225. ACM, New York (1993)CrossRefGoogle Scholar
  8. 8.
    Lacroix, V., Fernandes, C.G., Sagot, M.-F.: Motif search in graphs: Application to metabolic networks. IEEE/ACM TCBB 3, 360–368 (2006)Google Scholar
  9. 9.
    Sadakane, K., Imai, H.: Fast algorithms for k-word proximity search. IEICE Trans. Fundam. Electron., Comm., and Comp. E84-A(9), 2311–2318 (2001)Google Scholar
  10. 10.
    Shioura, A., Tamura, A., Uno, T.: An optimal algorithm for scanning all spanning trees of undirected graphs. SIAM J. Comput. 26(3), 678–692 (1997)MathSciNetzbMATHCrossRefGoogle Scholar
  11. 11.
    Tarjan, R.E., Read, R.C.: Bounds on backtrack algorithms for listing cycles, paths, and spanning trees. Networks 5(3), 237–252 (1975)MathSciNetzbMATHGoogle Scholar
  12. 12.
    Uno, T.: Two general methods to reduce delay and change of enumeration algorithms. Technical Report NII-2003-004E. National Institute of Informatics (2003)Google Scholar
  13. 13.
    Uno, T., Asai, T., Uchida, Y., Arimura, H.: An Efficient Algorithm for Enumerating Closed Patterns in Transaction Databases. In: Suzuki, E., Arikawa, S. (eds.) DS 2004. LNCS (LNAI), vol. 3245, pp. 16–31. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  14. 14.
    Zaki, M.J.: Efficiently mining frequent trees in a forest. In: KDD, pp. 71–80 (2002)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Kunihiro Wasa
    • 1
  • Yusaku Kaneta
    • 1
  • Takeaki Uno
    • 2
  • Hiroki Arimura
    • 1
  1. 1.ISTHokkaido UniversitySapporoJapan
  2. 2.National Institute of InformaticsTokyoJapan

Personalised recommendations