Suppose we have a undirected graph and each vertex has a initial weight . The weight for each vertex is actually a rotation (in radium). I want to minimize the difference between and , such that the difference is less than . In order to adjust the difference , we are allowed to add or subtract multiples of to as needed, i.e. .
I was wondering if there is a graph or optimization related method can solve this kind of problem?
Your question is a little bit confusing, but have you tried these algorithms?
http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm http://en.wikipedia.org/wiki/Prim%27s_algorithm