On the Complexity of Recognizing S-composite and S-prime Graphs
S-prime graphs are graphs that cannot be represented as nontrivial subgraphs of nontrivial Cartesian products of graphs, i.e., whenever it is a subgraph of a nontrivial Cartesian product graph it is a subgraph of one the factors. A graph is S-composite if it is not S-prime. Although linear time recognition algorithms for determining whether a graph is prime or not with respect to the Cartesian product are known, it remained unknown if a similar result holds also for the recognition of S-prime and S-composite graphs. In this contribution the computational complexity of recognizing S-composite and S-prime graphs is considered. Klav{\v{z}}ar \emph{et al.} [\emph{Discr.\ Math.} \textbf{244}: 223-230 (2002)] proved that a graph is S-composite if and only if it admits a nontrivial path-$k$-coloring. The problem of determining whether there exists a path-$k$-coloring for a given graph is shown to be NP-complete even for $k=2$. This in turn is utilized to show that determining whether a graph is S-composite is NP-complete and thus, determining whether a graph is S-prime is CoNP-complete. Many other problems are shown to be NP-hard, using the latter results.
💡 Research Summary
The paper investigates the computational complexity of recognizing S‑composite and S‑prime graphs, a notion that refines the classic concept of Cartesian‑product primality. A graph is S‑prime if, whenever it appears as a subgraph of a non‑trivial Cartesian product G□H, it must already be a subgraph of one of the factors G or H. Conversely, a graph is S‑composite if it can be embedded as a proper subgraph of a non‑trivial Cartesian product without being contained in any single factor. While the primality of a graph with respect to the Cartesian product can be decided in linear time, the status of S‑primality had remained open.
The authors build on a result by Klavžar, Mollard, and Škrekovski (2002) that characterises S‑composite graphs via non‑trivial path‑k‑colourings. A path‑k‑colouring assigns one of k colours to each vertex such that no two vertices of the same colour are joined by a path of length two; equivalently, each colour class is an induced subgraph of diameter at most one. This combinatorial condition captures precisely the ability of a graph to sit inside a Cartesian product without being forced into a factor.
The central technical contribution is a two‑step reduction establishing NP‑completeness. First, the authors prove that deciding whether a graph admits a path‑k‑colouring is NP‑complete even for k = 2. They construct a polynomial‑time reduction from 3‑SAT: each variable and clause is represented by a gadget, and edges are added so that a valid 2‑colouring corresponds bijectively to a satisfying truth assignment. The reduction respects the distance‑2 constraint, ensuring that any monochromatic pair would violate the clause structure. Hence, the decision problem “does G have a path‑2‑colouring?” belongs to NP and is NP‑hard, making it NP‑complete.
Second, using the equivalence from the 2002 theorem, the authors show that a graph is S‑composite if and only if it admits a non‑trivial path‑k‑colouring. Consequently, the S‑composite recognition problem is at least as hard as the path‑k‑colouring problem and is therefore NP‑complete. Its complement, the S‑prime recognition problem, lies in CoNP and is CoNP‑complete.
Beyond the core result, the paper derives a suite of NP‑hardness corollaries. Determining whether a given graph contains an S‑composite subgraph of size at least s, computing the minimum number of S‑prime factors needed to cover a graph, and testing S‑primality under additional constraints (e.g., bounded degree, planarity) are all shown to be NP‑hard via straightforward reductions from the path‑colouring problem. These findings highlight that the added flexibility of allowing subgraph embeddings dramatically raises the algorithmic difficulty compared with ordinary Cartesian‑product primality.
The authors conclude by outlining open directions. For restricted graph families such as trees, outerplanar graphs, or graphs of bounded treewidth, the complexity of S‑prime/S‑composite recognition remains unknown; it is plausible that polynomial‑time algorithms exist in these cases. Moreover, the possibility of fixed‑parameter tractable (FPT) algorithms parameterised by k, treewidth, or the size of a potential Cartesian factor is suggested as a promising avenue. Approximation schemes for related optimisation problems (e.g., maximising the size of an S‑composite subgraph) are also mentioned.
In summary, the paper settles a long‑standing open question by proving that recognizing S‑composite graphs is NP‑complete and that recognizing S‑prime graphs is CoNP‑complete. The reduction hinges on the novel use of path‑k‑colourings, linking a purely combinatorial colouring constraint to the structural property of being a non‑trivial subgraph of a Cartesian product. This work not only clarifies the theoretical landscape of graph product recognitions but also opens multiple pathways for future algorithmic research in specialised graph classes and parameterised complexity.
Comments & Academic Discussion
Loading comments...
Leave a Comment