Is there any polynomial algorithm to finding x1,x2,...,xn for fixed ai,j,pi,j and gi,j and (0 < i,j <= n) such that minimize sigma{pi,jci,j} where :
ai,j+xi-xj = ci,j (mod gi,j) , -1< ci,j < gi,j
x = a (mod b)
is the same as: there is an integer q
such that a + qb = x
is integer, therefore, x = a (mod b)
constraint is equivalent to x - bW = a, W >= 0
, W
is integral, i.e., your problem can be reformulated as a mixed-integer program, which is know to be NP-hard problem.