A multigraph $G = (V, E)$ is $(k, \ell)$-sparse if every subset $X \subseteq V$ induces at most $\max\{k|X| - \ell, 0\}$ edges. Finding a maximum-size $(k, \ell)$-sparse subgraph is a classical problem in rigidity theory and combinatorial optimization, with known polynomial-time algorithms. This paper presents a highly efficient and flexible implementation of an augmenting path method, enhanced with a range of powerful practical heuristics that significantly reduce running time while preserving optimality. These heuristics $\unicode{x2013}$ including edge-ordering, node-ordering, two-phase strategies, and pseudoforest-based initialization $\unicode{x2013}$ steer the algorithm toward accepting more edges early in the execution and avoiding costly augmentations. A comprehensive experimental evaluation on both synthetic and real-world graphs demonstrates that our implementation outperforms existing tools by several orders of magnitude. We also propose an asymptotically faster algorithm for extracting an inclusion-wise maximal $(k,2k)$-sparse subgraph with the sparsity condition required only for node sets of size at least three, which is particularly relevant to 3D rigidity when $k = 3$. We provide a carefully engineered implementation, which is publicly available online and is proposed for inclusion in the LEMON graph library.
翻译:若多重图$G = (V, E)$的任意子集$X \subseteq V$至多诱导$\max\{k|X| - \ell, 0\}$条边,则称其为$(k, \ell)$-稀疏图。寻找最大规模的$(k, \ell)$-稀疏子图是刚性理论与组合优化中的经典问题,存在已知的多项式时间算法。本文提出了一种高效且灵活的增广路径方法实现,该方法融合了一系列强大的实用启发式策略,在保持最优性的同时显著降低了运行时间。这些启发式策略——包括边排序、节点排序、两阶段策略以及基于伪森林的初始化——引导算法在早期接受更多边并避免代价高昂的增广操作。在合成图与真实世界图上的综合实验评估表明,我们的实现比现有工具快数个数量级。我们还提出了一种渐进更快的算法,用于提取包含意义下最大的$(k,2k)$-稀疏子图,其稀疏性条件仅需对规模不小于三的节点集成立,这在$k = 3$时与三维刚性理论尤为相关。我们提供了精心设计的实现,该实现已公开在线发布,并建议纳入LEMON图库。