Table of Contents
Fetching ...

Efficient Algorithms and Implementations for Extracting Maximum-Size $(k,\ell)$-Sparse Subgraphs

Péter Madarasi

TL;DR

This work addresses the problem of extracting maximum-size $(k,\ell)$-sparse subgraphs in multigraphs, a foundational task in rigidity theory and combinatorial optimization. It builds on the classic augmenting-path framework, maintaining an inner digraph $D$ and reorienting edges via path reversals to preserve sparsity, with a matroid structure ensuring optimality for $0\le \ell < 2k$ and a maximal (but not guaranteed maximum) solution for $\ell = 2k$. The main contributions are a highly optimized C++ implementation of multiple augmenting-path variants augmented with edge- and node-ordering heuristics, a two-phase forest-based preprocessing, and, for the special case $(k,2k)$, an $O(nm)$ algorithm; the code is publicly available and proposed for the LEMON library. Experiments on synthetic and real-world graphs demonstrate substantial speedups over existing tools, highlighting the practical impact of preprocessing and ordering strategies for rigidity-related computations.

Abstract

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.

Efficient Algorithms and Implementations for Extracting Maximum-Size $(k,\ell)$-Sparse Subgraphs

TL;DR

This work addresses the problem of extracting maximum-size -sparse subgraphs in multigraphs, a foundational task in rigidity theory and combinatorial optimization. It builds on the classic augmenting-path framework, maintaining an inner digraph and reorienting edges via path reversals to preserve sparsity, with a matroid structure ensuring optimality for and a maximal (but not guaranteed maximum) solution for . The main contributions are a highly optimized C++ implementation of multiple augmenting-path variants augmented with edge- and node-ordering heuristics, a two-phase forest-based preprocessing, and, for the special case , an algorithm; the code is publicly available and proposed for the LEMON library. Experiments on synthetic and real-world graphs demonstrate substantial speedups over existing tools, highlighting the practical impact of preprocessing and ordering strategies for rigidity-related computations.

Abstract

A multigraph is -sparse if every subset induces at most edges. Finding a maximum-size -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 including edge-ordering, node-ordering, two-phase strategies, and pseudoforest-based initialization 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 -sparse subgraph with the sparsity condition required only for node sets of size at least three, which is particularly relevant to 3D rigidity when . We provide a carefully engineered implementation, which is publicly available online and is proposed for inclusion in the LEMON graph library.

Paper Structure

This paper contains 15 sections, 1 theorem, 4 equations, 8 figures, 1 algorithm.

Key Result

Lemma 1

Let $G=(V,E)$ be a $(k,2k)$-sparse simple graph and let $u,v\in V$ be two of its nodes. Assume that there is no edge between $u$ and $v$. Let $D$ be an orientation of $G$ in which all indegrees are at most $k$, and the indegrees of $u$ and $v$ are zero. Then, $G + uv$ is $(k,2k)$-sparse if and only

Figures (8)

  • Figure 1: Erdős--Rényi random graphs. The Transp and TranspOne heuristics consistently outperform others for $p = 0.05$ and $p = 0.1$. For denser graphs, NBasic, NProcMin, and NInDegMin show competitive performance.
  • Figure 2: Barabási--Albert random graphs. As in Erdős--Rényi graphs, Transp and TranspOne continue to be the most efficient.
  • Figure 3: Rigid and tight graphs. For rigid graphs, the Basic heuristic performs best, suggesting that additional preprocessing and edge-ordering heuristics are unnecessary. In contrast, for $(k, k)$-tight graphs, Transp and TranspOne show superior efficiency.
  • Figure 4: Molecular and protein graphs. The PForestsBFS heuristic outperforms all others, highlighting the advantage of preprocessing steps that extract disjoint pseudoforests in real-world problem instances.
  • Figure 5: Erdős--Rényi random graphs. Although NInDegMinComp, RAugm, and KINARI implement the same component-based approach, their efficiency varies significantly. NInDegMinComp is the fastest among them, but Transp outperforms it, particularly for sparse graphs.
  • ...and 3 more figures

Theorems & Definitions (4)

  • Lemma 1
  • proof
  • Claim 1
  • proof