An Efficient Algorithm to Generate all Labeled Triangle-free Graphs with a given Graphical Degree Sequence
Kai Wang
TL;DR
The paper addresses generating all labeled triangle-free graphs with a given graphical degree sequence and discusses related decision problems and their potential computational complexity. It extends a prior backtracking generator with pruning-based stage-1 checks and a triangle-free stage-2 construction that uses residual-degree feasibility tests and lexicographic neighbor selection. It further extends the framework to generate all labeled bipartite realizations by adding a bipartiteness test, with stage-2 still parallelizable. Empirical evaluations show substantial pruning, correctness for small instances, and dramatic speedups over exhaustive realization enumeration, including cases where all triangle-free realizations are found quickly while full enumeration would be infeasible.
Abstract
We extend our previous algorithm that generates all labeled graphs with a given graphical degree sequence to generate all labeled triangle-free graphs with a given graphical degree sequence. The algorithm uses various pruning techniques to avoid having to first generate all labeled realizations of the input sequence and then testing whether each labeled realization is triangle-free. It can be further extended to generate all labeled bipartite graphs with a given graphical degree sequence by adding a simple test whether each generated triangle-free realization is a bipartite graph. All output graphs are generated in the lexicographical ordering as in the original algorithm. The algorithms can also be easily parallelized.
