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.
翻译:我们扩展了先前生成给定图形度序列下所有标记图的算法,使其能够生成给定图形度序列下所有标记无三角形图。该算法采用多种剪枝技术,避免了首先生成输入序列的所有标记实现再逐一检测每个标记实现是否无三角形的过程。通过添加简单的二分图检测步骤,该算法可进一步扩展为生成给定图形度序列下所有标记二分图。所有输出图均按照原始算法中的字典序生成。这些算法也易于并行化实现。