Congruence modulo m: Find Smallest Int Value

  • Thread starter Thread starter pc2-brazil
  • Start date Start date
Click For Summary
SUMMARY

The discussion centers on finding the integer with the smallest absolute value that is congruent to an integer a modulo m, where m is a positive integer. The key formula derived is x = a + km, where k is an integer. The smallest absolute value occurs when x mod m is less than or equal to ⌈m/2⌉, leading to the conclusion that if x mod m exceeds ⌈m/2⌉, the smallest integer is x = (x mod m) - m. For example, with a = 5 and m = 7, the smallest absolute value is 2, not 5, due to the relationship with ⌈m/2⌉.

PREREQUISITES
  • Understanding of modular arithmetic and congruences
  • Familiarity with the division algorithm
  • Knowledge of integer properties and absolute values
  • Basic algebraic manipulation skills
NEXT STEPS
  • Study the properties of congruences in modular arithmetic
  • Learn about the division algorithm and its applications in number theory
  • Explore the concept of absolute value and its implications in mathematics
  • Investigate examples of congruences with different values of a and m
USEFUL FOR

Students studying number theory, mathematicians interested in modular arithmetic, and anyone seeking to understand the properties of congruences and their applications in solving integer problems.

pc2-brazil
Messages
198
Reaction score
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
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.[/itex]
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
15
Views
4K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
17K