Exact counting of subtrees with diameter no more than d in trees: A generating function approach

Network motifs, regarded as fundamental building blocks, offer crucial insights into the structure and function of complex networks, with broad applications across disciplines including sociology, computer science, bioinformatics, chemoinformatics, and pharmaceutics. However, the identification of n...

Full description

Saved in:
Bibliographic Details
Published in:Information and computation Vol. 307; p. 105353
Main Authors: Yang, Yu, Jin, Bang-Bang, Sun, Xiaoming, Zhang, Xiao-Dong, Li, Bo, Zhao, Kai, Wang, Hua
Format: Journal Article
Language:English
Published: Elsevier Inc 01.11.2025
Subjects:
ISSN:0890-5401
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Network motifs, regarded as fundamental building blocks, offer crucial insights into the structure and function of complex networks, with broad applications across disciplines including sociology, computer science, bioinformatics, chemoinformatics, and pharmaceutics. However, the identification of network motifs remains a significant and computationally challenging problem. Among various motifs, subtree enumeration has garnered substantial attention in recent years, particularly due to its relevance in network science and bioinformatics. For an n-vertex tree T, by introducing novel generating functions with (d+2) variables, we propose an innovative algorithm for the exact enumeration of T's subtrees rooted at fixed vertex v, where the distance between v and the farthest leaf is k=0,1,…,d, and the distance between any two leaves is no more than d. Building on this algorithm, we develop novel recursive algorithms for exact enumerating various diameter no more than d subtrees (abbreviated as DNMT-d subtrees) of T. As applications, we apply these algorithms to derive the number of DNMT-d subtrees in a full binary tree Bh with h≥2 levels, and briefly discuss the density of DNMT-d subtrees in general trees. Our research generalizes the work of Frank Ruskey on Listing and Counting Subtrees of a Tree in 1981 and makes it a special case of our study where d equals the diameter of the tree T. Moreover, the proposed O(dn2) algorithms introduce new approaches for enumerating subtrees under diameter constraints and lay the groundwork for counting diameter-constrained subgraphs (motifs) in complex networks.
ISSN:0890-5401
DOI:10.1016/j.ic.2025.105353