{"title":"Finding and counting patterns in sparse graphs","authors":"Balagopal Komarath , Anant Kumar , Suchismita Mishra , Aditi Sethia","doi":"10.1016/j.jcss.2025.103728","DOIUrl":null,"url":null,"abstract":"<div><div>We consider algorithms for finding and counting small, fixed graphs in sparse host graphs. In the non-sparse setting, the parameters treedepth and treewidth play a crucial role in fast, constant-space and polynomial-space algorithms respectively. We discover two new parameters that we call matched treedepth and matched treewidth. We show that, for many patterns, finding and counting patterns with low matched treedepth and low matched treewidth can be done asymptotically faster than the existing algorithms when the host graphs are sparse. As an application to finding and counting fixed-size patterns, we discover <span><math><mover><mrow><mi>O</mi></mrow><mrow><mo>˜</mo></mrow></mover><mo>(</mo><msup><mrow><mi>m</mi></mrow><mrow><mn>3</mn></mrow></msup><mo>)</mo></math></span>-time.<span><span><sup>1</sup></span></span> constant-space algorithms for graphs on at most 11 edges and <span><math><mover><mrow><mi>O</mi></mrow><mrow><mo>˜</mo></mrow></mover><mo>(</mo><msup><mrow><mi>m</mi></mrow><mrow><mn>2</mn></mrow></msup><mo>)</mo></math></span>-time, polynomial-space algorithms for graphs on at most 9 edges.<span><span><sup>2</sup></span></span></div></div>","PeriodicalId":50224,"journal":{"name":"Journal of Computer and System Sciences","volume":"157 ","pages":"Article 103728"},"PeriodicalIF":1.4000,"publicationDate":"2026-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Computer and System Sciences","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0022000025001102","RegionNum":3,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/11/19 0:00:00","PubModel":"Epub","JCR":"Q1","JCRName":"BUSINESS, FINANCE","Score":null,"Total":0}
引用次数: 0
Abstract
We consider algorithms for finding and counting small, fixed graphs in sparse host graphs. In the non-sparse setting, the parameters treedepth and treewidth play a crucial role in fast, constant-space and polynomial-space algorithms respectively. We discover two new parameters that we call matched treedepth and matched treewidth. We show that, for many patterns, finding and counting patterns with low matched treedepth and low matched treewidth can be done asymptotically faster than the existing algorithms when the host graphs are sparse. As an application to finding and counting fixed-size patterns, we discover -time.1 constant-space algorithms for graphs on at most 11 edges and -time, polynomial-space algorithms for graphs on at most 9 edges.2
期刊介绍:
The Journal of Computer and System Sciences publishes original research papers in computer science and related subjects in system science, with attention to the relevant mathematical theory. Applications-oriented papers may also be accepted and they are expected to contain deep analytic evaluation of the proposed solutions.
Research areas include traditional subjects such as:
• Theory of algorithms and computability
• Formal languages
• Automata theory
Contemporary subjects such as:
• Complexity theory
• Algorithmic Complexity
• Parallel & distributed computing
• Computer networks
• Neural networks
• Computational learning theory
• Database theory & practice
• Computer modeling of complex systems
• Security and Privacy.