English

Counting and Sampling Labeled Chordal Graphs in Polynomial Time

Data Structures and Algorithms 2024-10-04 v2

Abstract

We present the first polynomial-time algorithm to exactly compute the number of labeled chordal graphs on nn vertices. Our algorithm solves a more general problem: given nn and ω\omega as input, it computes the number of ω\omega-colorable labeled chordal graphs on nn vertices, using O(n7)O(n^7) arithmetic operations. A standard sampling-to-counting reduction then yields a polynomial-time exact sampler that generates an ω\omega-colorable labeled chordal graph on nn vertices uniformly at random. Our counting algorithm improves upon the previous best result by Wormald (1985), which computes the number of labeled chordal graphs on nn vertices in time exponential in nn. An implementation of the polynomial-time counting algorithm gives the number of labeled chordal graphs on up to 3030 vertices in less than three minutes on a standard desktop computer. Previously, the number of labeled chordal graphs was only known for graphs on up to 1515 vertices. In addition, we design two approximation algorithms: (1) an approximate counting algorithm that computes a (1±ε)(1\pm\varepsilon)-approximation of the number of nn-vertex labeled chordal graphs, and (2) an approximate sampling algorithm that generates a random labeled chordal graph according to a distribution whose total variation distance from the uniform distribution is at most ε\varepsilon. The approximate counting algorithm runs in O(n3lognlog7(1/ε))O(n^3\log{n}\log^7(1/\varepsilon)) time, and the approximate sampling algorithm runs in O(n3lognlog7(1/ε))O(n^3\log{n}\log^7(1/\varepsilon)) expected time.

Keywords

Cite

@article{arxiv.2308.09703,
  title  = {Counting and Sampling Labeled Chordal Graphs in Polynomial Time},
  author = {Ursula Hebert-Johnson and Daniel Lokshtanov and Eric Vigoda},
  journal= {arXiv preprint arXiv:2308.09703},
  year   = {2024}
}

Comments

Accepted for publication at ESA 2023 (European Symposium on Algorithms); 52 pages, 4 figures

R2 v1 2026-06-28T11:58:58.704Z