We present an efficient algorithm for a problem in the interface between clustering and graph embeddings. An embedding of a graph into a 2-manifold maps the vertices in to distinct points and the edges in to interior-disjoint Jordan arcs between the corresponding vertices. In applications in clustering, cartography, and visualization, nearby vertices and edges are often bundled to a common node or arc, due to data compression or low resolution. This raises the computational problem of deciding whether a given map comes from an embedding. A map is a weak embedding if it can be perturbed into an embedding with for every .
A polynomial-time algorithm for recognizing weak embeddings was recently found by Fulek and Kynčl (2017), which reduces to solving a system of linear equations over . It runs in time, where is the matrix multiplication exponent and is the number of vertices and edges of . We improve the running time to . Our algorithm is also conceptually simpler than that of Fulek and Kynčl: We perform a sequence of local operations that gradually “untangles” the image into an embedding , or reports that is not a weak embedding. It generalizes a recent technique developed for the case that is a cycle and the embedding is a simple polygon, and combines local constraints on the orientation of subgraphs directly, thereby eliminating the need for solving large systems of linear equations. Joint work with Hugo A. Akitaya and Radoslav Fulek.