[en] We introduce the concept of constant 2-labelling of a weighted graph and show
how it can be used to obtain periodic sphere packing. Roughly speaking, a
constant 2-labelling of a weighted graph is a 2-coloring (black and white) of
its vertex set which preserves the sum of the weight of black vertices under
some automorphisms. In this manuscript, we study this problem on weighted
complete graphs and on weighted cycles. Our results on cycles allow us to
determine (r,a,b)-codes in Z^2 whenever |a-b|>4 and r>1.