paper

Counting Subgraphs in Degenerate Graphs

arXiv:2010.05998

Abstract

We consider the problem of counting the number of copies of a fixed graph within an input graph . This is one of the most well-studied algorithmic graph problems, with many theoretical and practical applications. We focus on solving this problem when the input has bounded degeneracy. This is a rich family of graphs, containing all graphs without a fixed minor (e.g. planar graphs), as well as graphs generated by various random processes (e.g. preferential attachment graphs). We say that is easy if there is a linear-time algorithm for counting the number of copies of in an input of bounded degeneracy. A seminal result of Chiba and Nishizeki from '85 states that every on at most 4 vertices is easy. Bera, Pashanasangi, and Seshadhri recently extended this to all on 5 vertices, and further proved that for every there is a -vertex which is not easy. They left open the natural problem of characterizing all easy graphs . Bressan has recently introduced a framework for counting subgraphs in degenerate graphs, from which one can extract a sufficient condition for a graph to be easy. Here we show that this sufficient condition is also necessary, thus fully answering the Bera--Pashanasangi--Seshadhri problem. We further resolve two closely related problems; namely characterizing the graphs that are easy with respect to counting induced copies, and with respect to counting homomorphisms.