The existence of a constant time algorithm for solving different domination problems on the subclass of polygraphs, rotagraphs and fasciagraphs, is shown by means of path algebras. As these graphs include products (the Cartesian, strong, direct, lexicographic) of paths and cycles, we implement the algorithm to get formulas in the case of the domination numbers, the Roman domination numbers and ...