Yu Yang , Bang-Bang Jin , Xiaoming Sun , Xiao-Dong Zhang , Bo Li , Kai Zhao , Hua Wang
{"title":"树中直径不超过d的子树的精确计数:一种生成函数方法","authors":"Yu Yang , Bang-Bang Jin , Xiaoming Sun , Xiao-Dong Zhang , Bo Li , Kai Zhao , Hua Wang","doi":"10.1016/j.ic.2025.105353","DOIUrl":null,"url":null,"abstract":"<div><div>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 <em>n</em>-vertex tree <em>T</em>, by introducing novel generating functions with <span><math><mo>(</mo><mi>d</mi><mo>+</mo><mn>2</mn><mo>)</mo></math></span> variables, we propose an innovative algorithm for the exact enumeration of <em>T</em>'s subtrees rooted at fixed vertex <em>v</em>, where the distance between <em>v</em> and the farthest leaf is <span><math><mi>k</mi><mo>=</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mo>…</mo><mo>,</mo><mi>d</mi></math></span>, and the distance between any two leaves is no more than <em>d</em>. Building on this algorithm, we develop novel recursive algorithms for exact enumerating various diameter no more than <em>d</em> subtrees (abbreviated as DNMT-<em>d</em> subtrees) of <em>T</em>. As applications, we apply these algorithms to derive the number of DNMT-<em>d</em> subtrees in a full binary tree <span><math><msub><mrow><mi>B</mi></mrow><mrow><mi>h</mi></mrow></msub></math></span> with <span><math><mi>h</mi><mo>≥</mo><mn>2</mn></math></span> levels, and briefly discuss the density of DNMT-<em>d</em> 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 <em>d</em> equals the diameter of the tree <em>T</em>. Moreover, the proposed <span><math><mi>O</mi><mo>(</mo><mi>d</mi><msup><mrow><mi>n</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></math></span> algorithms introduce new approaches for enumerating subtrees under diameter constraints and lay the groundwork for counting diameter-constrained subgraphs (motifs) in complex networks.</div></div>","PeriodicalId":54985,"journal":{"name":"Information and Computation","volume":"307 ","pages":"Article 105353"},"PeriodicalIF":1.0000,"publicationDate":"2025-09-03","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Exact counting of subtrees with diameter no more than d in trees: A generating function approach\",\"authors\":\"Yu Yang , Bang-Bang Jin , Xiaoming Sun , Xiao-Dong Zhang , Bo Li , Kai Zhao , Hua Wang\",\"doi\":\"10.1016/j.ic.2025.105353\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><div>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 <em>n</em>-vertex tree <em>T</em>, by introducing novel generating functions with <span><math><mo>(</mo><mi>d</mi><mo>+</mo><mn>2</mn><mo>)</mo></math></span> variables, we propose an innovative algorithm for the exact enumeration of <em>T</em>'s subtrees rooted at fixed vertex <em>v</em>, where the distance between <em>v</em> and the farthest leaf is <span><math><mi>k</mi><mo>=</mo><mn>0</mn><mo>,</mo><mn>1</mn><mo>,</mo><mo>…</mo><mo>,</mo><mi>d</mi></math></span>, and the distance between any two leaves is no more than <em>d</em>. Building on this algorithm, we develop novel recursive algorithms for exact enumerating various diameter no more than <em>d</em> subtrees (abbreviated as DNMT-<em>d</em> subtrees) of <em>T</em>. As applications, we apply these algorithms to derive the number of DNMT-<em>d</em> subtrees in a full binary tree <span><math><msub><mrow><mi>B</mi></mrow><mrow><mi>h</mi></mrow></msub></math></span> with <span><math><mi>h</mi><mo>≥</mo><mn>2</mn></math></span> levels, and briefly discuss the density of DNMT-<em>d</em> 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 <em>d</em> equals the diameter of the tree <em>T</em>. Moreover, the proposed <span><math><mi>O</mi><mo>(</mo><mi>d</mi><msup><mrow><mi>n</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></math></span> algorithms introduce new approaches for enumerating subtrees under diameter constraints and lay the groundwork for counting diameter-constrained subgraphs (motifs) in complex networks.</div></div>\",\"PeriodicalId\":54985,\"journal\":{\"name\":\"Information and Computation\",\"volume\":\"307 \",\"pages\":\"Article 105353\"},\"PeriodicalIF\":1.0000,\"publicationDate\":\"2025-09-03\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Information and Computation\",\"FirstCategoryId\":\"94\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0890540125000896\",\"RegionNum\":4,\"RegionCategory\":\"计算机科学\",\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"Q3\",\"JCRName\":\"COMPUTER SCIENCE, THEORY & METHODS\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Information and Computation","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0890540125000896","RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"COMPUTER SCIENCE, THEORY & METHODS","Score":null,"Total":0}
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 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 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 , 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 with 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 algorithms introduce new approaches for enumerating subtrees under diameter constraints and lay the groundwork for counting diameter-constrained subgraphs (motifs) in complex networks.
期刊介绍:
Information and Computation welcomes original papers in all areas of theoretical computer science and computational applications of information theory. Survey articles of exceptional quality will also be considered. Particularly welcome are papers contributing new results in active theoretical areas such as
-Biological computation and computational biology-
Computational complexity-
Computer theorem-proving-
Concurrency and distributed process theory-
Cryptographic theory-
Data base theory-
Decision problems in logic-
Design and analysis of algorithms-
Discrete optimization and mathematical programming-
Inductive inference and learning theory-
Logic & constraint programming-
Program verification & model checking-
Probabilistic & Quantum computation-
Semantics of programming languages-
Symbolic computation, lambda calculus, and rewriting systems-
Types and typechecking