(adsbygoogle = window.adsbygoogle || []).push({}); 1. The problem statement, all variables and given/known data

Find a formula for the integer with smallest absolute value that is congruent to an integeramodulom, wheremis a positive integer.

2. Relevant equations

An integer x is congruent to an integeramodulomif and only if:

[tex]x \equiv a \pmod m[/tex]

3. The attempt at a solution

From the definition:

[tex]x \mod m = a \mod m[/tex]

or:

[tex]x - a = km[/tex]

where k is an integer.

From the division "algorithm":

[tex]x = mq + a\mod m[/tex]

where q is the quotient.

But I'm not sure on how to proceed from here. The textbook gives a strange answer: [itex]x \mod m[/itex] if [itex]x \mod m \leq \left \lceil m/2 \right \rceil[/itex] and [itex](x \mod m) - m[/itex] if [itex]x \mod m > \left \lceil m/2 \right \rceil[/itex]

I would say that the smallest absolute value ofxis when the quotient (qabove) is 0. Thus:

[tex]x=a\mod m[/tex]

According to the answer, [itex]x=a\mod m[/itex] is only true if [itex]x \mod m \leq \left \lceil m/2 \right \rceil[/itex], but I can't figure out why.

Thank you in advance.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Homework Help: Congruence modulo m

**Physics Forums | Science Articles, Homework Help, Discussion**