Solving Modular Arithmetic Homework: ax = 1 (mod m)

  • Thread starter squaremeplz
  • Start date
  • Tags
    Arithmetic
In summary, modular arithmetic is a type of arithmetic that deals with numbers that "wrap around" a fixed value called the modulus. It is often used to solve problems related to time, calendars, and cryptography. The expression ax = 1 (mod m) means that when the number ax is divided by the modulus m, the remainder is 1. To solve for x, you can use the concept of modular inverse. Some common methods for solving modular arithmetic problems include using the extended Euclidean algorithm, Fermat's little theorem, and Euler's theorem. Modular arithmetic has many practical applications, especially in fields such as computer science, engineering, and cryptography. It is also used in various scheduling problems.
  • #1
squaremeplz
124
0

Homework Statement



Find x for

ax = 1 (mod m)

a) a = 15 , m = 31
b) a = 6, m = 93
c) a = 15, m = 20

if possible.


(The equal sign above is equivalence in modular arithmetic)


Homework Equations





The Attempt at a Solution



a) gcd(31,5) = gcd( 31 - 2*15, 15) = 1

thus (1)(31) + (-2)(15) = 1

and (-2) * 15 = 1 (mod 31)

i don't understand how I can find x since multiplying by -2 yields a number smaller than the modulus

b) gcd(93,6) = 3

no solution because gcd =/= 1

c) gcd(20,15) = 5

no solution


Could somebody please help me out with these problems. It's my first time doing modular arithmetic and the book has only two examples.

Thank you!
 
Last edited by a moderator:
Physics news on Phys.org
  • #2
i don't understand how I can find x since multiplying by -2 yields a number smaller than the modulus.

Is -30 (mod 31) not 1? Not too sure what you're asking.
 
  • #3
squaremeplease said:

Homework Statement



Find x for

ax = 1 (mod m)

a) a = 15 , m = 31
b) a = 6, m = 93
c) a = 15, m = 20

if possible.


(The equal sign above is equivalence in modular arithmetic)


Homework Equations





The Attempt at a Solution



a) gcd(31,5) = gcd( 31 - 2*15, 15) = 1

thus (1)(31) + (-2)(15) = 1

and (-2) * 15 = 1 (mod 31)

i don't understand how I can find x since multiplying by -2 yields a number smaller than the modulus.
2(15)= 30 is "smaller than the modulus" but -2(15)= -30= (-1)(31)+ 1 so -2(15) is equal to 1 mod 31. Strictly speaking, the "numbers" in modulo arithmetic are equivalence classes of integers having the same remainder when multiplied by the modulus- one of which is a non-negative number less than the modulus. 1, for example, is in the set also containing 31+1= 32, -31+1= -30, 2(31)+1= 63, etc. -2 is in the same set as 31- 2= 29.


b) gcd(93,6) = 3

no solution because gcd =/= 1

c) gcd(20,15) = 5

no solution


Could somebody please help me out with these problems. It's my first time doing modular arithmetic and the book has only two examples.

Thank you!
Both b and c are correct. If 6x= 1 (mod 93) then 6x= 93n+ 1 for some integer n or 6x- 93= 1. As you say, since both 6 and 93 have a factor of 3, 6x- 93= 3(2x- 31) has a factor of 3 no matter what x is and so cannot be equal to 1. Similarly, if 15x= 1 (mod 20), then 15x= 20n+ 1 or 15x- 20n= 1 for some integer n. Since 15 and 20 both have a factor of 5, 15x- 20n= 5(3x- 4n) is a multiple of 5 and cannot be equal to 1.
 

What is modular arithmetic?

Modular arithmetic is a type of arithmetic that deals with numbers that "wrap around" a fixed value called the modulus. This means that after a certain number is reached, the counting starts over from 0. It is often used to solve problems related to time, calendars, and cryptography.

What does ax = 1 (mod m) mean?

The expression ax = 1 (mod m) means that when the number ax is divided by the modulus m, the remainder is 1. In other words, ax is congruent to 1 modulo m.

How do I solve for x in ax = 1 (mod m)?

To solve for x, you can use the concept of modular inverse. This means finding a number y that, when multiplied by a, results in 1 when divided by the modulus m. This can be written as ay = 1 (mod m). Once you find the value of y, x can be calculated by taking the modulus of y with respect to m.

What are some common methods for solving modular arithmetic problems?

Some common methods for solving modular arithmetic problems include using the extended Euclidean algorithm, Fermat's little theorem, and Euler's theorem. These methods use mathematical concepts such as modular inverse, congruence, and exponentiation to solve equations involving modular arithmetic.

What are some practical applications of modular arithmetic?

Modular arithmetic has many practical applications, especially in fields such as computer science, engineering, and cryptography. It is used in computer systems to perform operations on large numbers efficiently, in cryptography to ensure secure communication, and in error-correcting codes to detect and correct errors in data transmission. It is also used in various scheduling problems, such as creating timetables and assigning tasks to workers.

Similar threads

  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
946
  • Calculus and Beyond Homework Help
Replies
1
Views
5K
  • Calculus and Beyond Homework Help
Replies
11
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
856
  • Calculus and Beyond Homework Help
Replies
2
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
849
Back
Top