Flexible realizations existence: NP-completeness on sparse graphs and algorithms
Petr Laštovička, Jan Legerský
TL;DR
The paper studies the problem of determining whether a graph admits a flexible planar realization by leveraging NAC-colorings. It establishes NP-completeness results on sparse graphs, including max degree five and average degree near 4, via careful gadget constructions, and proves fixed-parameter tractability with respect to treewidth using Courcelle's theorem and a detailed dynamic-programming scheme. It also contributes practical algorithms for finding and counting NAC-colorings, including NAC-valid relations, small-cycle pruning, and subgraph decomposition/merging techniques, with extensive benchmarks showing substantial speedups over prior implementations. These results advance both the theoretical understanding and the practical computation of graph rigidity and flexibility in the plane.
Abstract
One of the questions in Rigidity Theory is whether a realization of the vertices of a graph in the plane is flexible, namely, if it allows a continuous deformation preserving the edge lengths. A flexible realization of a connected graph in the plane exists if and only if the graph has a NAC-coloring, which is a surjective edge coloring by two colors such that for each cycle, either all the edges have the same color, or there are at least two edges of each color. The question whether a graph has a NAC-coloring, and hence also the existence of a flexible realization, has been proven to be NP-complete. We show that this question is also NP-complete on graphs with maximum degree five and on graphs with the average degree at most $4+\varepsilon$ for every fixed $\varepsilon >0$. We also show that NAC-colorings can be counted in linear time for graphs with bounded treewidth. Since the only existing implementation of checking the existence of a NAC-coloring is rather naive, we propose new algorithms along with their implementation, which is significantly faster. We also focus on searching all NAC-colorings of a graph, since they provide useful information about its possible flexible realizations.
