Abstract
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žar et al. [S. Klavžar, A. Lipovec, M. Petkovšek, On subgraphs of Cartesian product graphs. Discrete Math., 244 (2002) 223–230] proved that a graph is S-composite if and only if it admits a nontrivial path-kk-coloring. The problem of determining whether there exists a path-kk-coloring for a given graph is shown to be NP-complete even for k=2k=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. A plenty of other problems are shown to be NP-hard, using the latter results.