  Let G=(V,E) be a graph and d a positive integer. We study the following
problem: for which labelings f_E: E \to Z_d is there a labeling f_V:V \to Z_d
such that f_E(i,j) = f_V(i) + f_V(j) (mod d), for every edge (i,j) in E? We
also explore the connections of the equivalent multiplicative version to toric
ideals. We derive a polynomial algorithm to answer these questions and to
obtain all possible solutions.
