
Since many real-world graphs are nonplanar, the study of graphs that allow few crossings per edge has been an active subfield of graph theory in recent years. One of the most natural generalizations of planar graphs are the so-called 1-planar graphs that admit a drawing with at most one crossing per edge. Unfortunately, testing whether a graph is 1-planar is known to be NP-complete even for very restricted graph classes. On the positive side, Binucci, Didimo and Montecchiani [7] presented the first practical algorithm for testing 1-planarity based on an easy-to-implement backtracking strategy. We build on this idea and systematically explore the design choices of such algorithms and propose several new ingredients, such as different branching strategies and multiple filter criteria that allow us to reject certain branches in the search tree early on. We conduct an extensive experimental evaluation that evaluates the efficiency and effectiveness of these ingredients. Given a time limit of three hours per instance, our best configuration is able to solve more than 98% of the non-planar instances from the well-known North and Rome graphs with up to 50 vertices. Notably, the median running time for solved instances is well below 1 second.
We present OOPS (Optimized One-Planarity Solver), a practical heuristicfor recognizing 1-planar graphs and several important subclasses. A graphis 1-planar if it can be drawn in the plane such that each edge is crossed at mostonce---a natural generalization of planar graphs that has received increasingattention in graph drawing and beyond-planar graph theory. Although testing planarity can be done in linear time,recognizing 1-planar graphs is NP-complete, making effective practical algorithms especially valuable.The core idea of our approach is to reduce the recognition of 1-planarity to a propositional satisfiability (SAT) instance,enabling the use of modern SAT solvers to efficiently explore the search space. Despite the inherent complexityof the problem, our method is substantially faster in practice than naïve or brute-force algorithms.In addition to demonstrating the empirical performance of our solver on synthetic and real-worldinstances, we show how OOPS can be used as a discovery tool in theoretical graph theory. Specifically,we employ OOPS to investigate two research problems concerning 1-planarity of specific graph families.Our implementation of the algorithm is publicly available to support further exploration in the field.