Congruence modulo m: Find Smallest Int Value

  • Thread starter pc2-brazil
  • Start date
In summary: If a is less than m/2, then a is bigger than -m/2 and so a- m has smaller absolute value. If a is greater than m/2, then a is smaller than m+ m/2= 3m/2 and so a+ m has smaller absolute value.
  • #1
pc2-brazil
205
3

Homework Statement


Find a formula for the integer with smallest absolute value that is congruent to an integer a modulo m, where m is a positive integer.

Homework Equations


An integer x is congruent to an integer a modulo m if and only if:
[tex]x \equiv a \pmod m[/tex]

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 of x is when the quotient (q above) 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 news on Phys.org
  • #2
For example, If a= 5 and m= 7, then x= 5 (mod 7) if and only if x= 5+ 7k for integer k. k= 0 gives x= 5, of course, and k= -1 gives x= -2. The "smallest absolute value" is 2, not 5, because ⌈m/2⌉= 3 and 3< 5. If a= 3 then x= 3 (mod n7) if and only if x= 3+ 7k. k= 0 gives x= 3 while k= -1 gives 3- 7= -4. Now the "smallest absolute value" is 3.

In general x= a (mod m) (for [itex]0\le a< m) if and only if x= a+ mk for integer k. k= 0 gives x= a> 0 and k= -1 gives a- m< 0. Which of those has smaller absolute value depends on how close a is to m.
 

FAQ: Congruence modulo m: Find Smallest Int Value

What is congruence modulo m?

Congruence modulo m is a mathematical concept that refers to the relationship between two numbers being equal when divided by a specific number, called the modulus.

How do you find the smallest integer value in congruence modulo m?

The smallest integer value in congruence modulo m can be found by dividing the modulus by the remainder of the congruence. This will give the smallest positive integer solution.

What is the purpose of finding the smallest integer value in congruence modulo m?

The purpose of finding the smallest integer value in congruence modulo m is to simplify a congruence equation and make it easier to solve.

Are there any other methods for finding the smallest integer value in congruence modulo m?

Yes, there are other methods such as using the Extended Euclidean Algorithm or the Chinese Remainder Theorem. These methods are more efficient for solving larger congruence equations.

Can the smallest integer value in congruence modulo m be negative?

Yes, the smallest integer value in congruence modulo m can be negative. It depends on the congruence equation and the modulus used.

Back
Top