Answer
. Let's first look at an example or two. If m = 7, then the usual set of values we use for the congruence classes
modulo m is { 0, 1, 2, 3, 4, 5, 6}. However, we can replace 6 by -1, 5 by -2, and 4 by -3 to get the collection
{ -3, -2, -1, 0, 1, 2, 3}. These will be the values with smallest absolute values. Similarly, if m = 8, then the
collection we want is {-3, -2, -1, 0, 1, 2, 3, 4} ( {-4, -3. -2, -1,0, 1,2,3} would do just as well). In general,
in place of {O, 1, 2, ... , m - 1} we can use {I -m/21, f -m/21 + 1, ... , -1, 0, 1, 2, ... , I m/21}, omitting either
f -m/21 or I m/21 if m is even. Note that the values in {O, 1, 2, ... , m - 1} greater than I m/21 have had m
subtracted from them to produce the negative values in our answer. As for a formula to produce these values,
we can use a two-part formula:
f(x) = { x mod m if x mod m::; lm/21
(x mod m) - m if x mod m > f m/2l
Note that if m is even, then we can, alternatively, take f(m/2) = -m/2.
Work Step by Step
first step : look at an example or two. If m = 7, then the usual set of values we use for the congruence classes
modulo m is { 0, 1, 2, 3, 4, 5, 6}.
2nd step: we can replace 6 by -1, 5 by -2, and 4 by -3 to get the collection
{ -3, -2, -1, 0, 1, 2, 3}. These will be the values with smallest absolute values.
3rd step: Similarly, if m = 8, then the
collection we want is {-3, -2, -1, 0, 1, 2, 3, 4} ( {-4, -3. -2, -1,0, 1,2,3} would do just as well). In general,
in place of {O, 1, 2, ... , m - 1} we can use {I -m/21, f -m/21 + 1, ... , -1, 0, 1, 2, ... , I m/21}, omitting either
f -m/21 or I m/21 if m is even. Note that the values in {O, 1, 2, ... , m - 1} greater than I m/21 have had m
subtracted from them to produce the negative values in our answer. 4th step: As for a formula to produce these values,
we can use a two-part formula:
f(x) = { x mod m if x mod m::; lm/21
(x mod m) - m if x mod m > f m/2l
Note that if m is even, then we can, alternatively, take f(m/2) = -m/2.