paper

On the Reachability Problem on Monoid-Labelled Undirected Graphs

arXiv:2606.21103

Abstract

The labelled reachability problem for undirected graphs with edges labelled by elements of a monoid (more generally, groupoids or magmas) captures the classes and . Given a graph labelled by , and an accepting subset , the problem asks to test whether there is a walk from to in where . Ramaswamy et al. (2019) studied the variant where the accepting element is part of the input for aperiodic monoids and groups. Motivated by the success in designing space-bounded algorithms for the undirected graph reachability problem, we study the labelled reachability problem when the accepting set is also fixed. This reveals finer complexity bounds and dichotomies for the problem based on the monoid and the accepting set. Previous results imply that the problem is in for any finite accepting subset when is a group or belongs to . We prove the following (for finite monoids): 1) For any monoid , the problem is in when the accepting element is the identity of . If the accepting element is an idempotent, under suitable constraints, the problem is -hard. 2) For any commutative monoid , the problem is in for all . 3) For any -commutative union-of-groups (UoG) monoid , the problem is in for all . We show deterministic logspace algorithms for UoG monoids that are neither -commutative nor -commutative, under certain constraints. 4) For the monoids and , we show a dichotomy: for all , the problem is either -complete or in . Our results exploit the connection between Green's relations in the UoG monoids and the properties of the product graph (a graph introduced by Ramaswamy et al. (2019)).

28 pages, 3 figures, 2 tables; A preliminary version of the paper appeared in the proceedings of the 22nd International Conference Relational and Algebraic Methods in Computer Science (RAMiCS 2026). Abstract shortened to meet arxiv requirements

On the Reachability Problem on Monoid-Labelled Undirected Graphs · wovepaper