practice problems
Q1. Does there exist an integer x satisfying the following conditions?
10x = 1 mod 21
5x = 2 mod 6
4x = 1 mod 7
S1.
No.
Why?
[1] =>
10x = 1 mod 21
=> 10x = 1 mod 3 and 10x = 1 mod 7
=> x = 1 mod 3 and 3x = 1 mod 7 => 36x = 12 mod 7 => x = 5 mod 7
So we have
x = 1 mod 3 and x = 5 mod 7
[2] =>
5x = 2 mod 6
=> 5x = 6k + 2
=> 5x = 2 mod 3 => 2x = 2 mod 3 => 4x = 4 mod 3 => x = 1 mod 3
And
5x = 0 mod 2 => x = 0 mod 2
So we have
x = 1 mod 3
x = 5 mod 7
x = 0 mod 2
[3] =>
4x = 1 mod 7 =>
8x = 2 mod 7 =>
x = 2 mod 7
Which is a contradiction to existing solutions.
Q2. For how many n between 1 and 2520 do we have n^3 = 1 mod 2520?
S2.
2520 = 2^3 * 3^2 * 5 * 7
So
n^3 = 1 mod 8 => n = 1 mod 8
n^3 = 1 mod 9 => n = 1,4,7 mod 9
n^3 = 1 mod 5 => n = 1 mod 5
n^3 = 1 mod 7 => n = 1,2,4 mod 7
For each of those options there is a unique solution (using CRT) between 1 and 2520.
So total 9 valid solutions.
Q3.
Find positive integers a,b,c <= 475 s.t.
a≡0(mod25),a≡1(mod19)
b≡1(mod25),b≡0(mod19)
c≡10(mod25),c≡4(mod19)
S3.
a = 25k = 1 mod 19 = 6k => 18k = 3 mod 19 => -k = 3 mod 19 => k = -3 mod 19 => k = 16
=> a = 400.
b = 19k = 1 mod 25 => -6k = 1 => -24k = 4 mod 25 => k = 4 mod 25 => b = 19*4 = 76
For 'c', we will use CRT:
c = p*19 + q*25
10 = 19p mod 25
=> p = 15
4 = 25q mod 19 = 6q
12 = 18q mod 19 = -q
=> q = -12 = 7 mod 19
c = 7*25 + 15*19 = 175 + 285 = 460
Q4.
Find 2^4034 mod 1000.
S4.
If 2 and 1000 were co-prime we could have simply applied Euler totient theorem to get the answer here.
But they are not.
So we break down 1000 into 125*8 so that 2,125 are co-prime.
1000 = 125*8 = 5^3 * 2^3
Let X = 2^4034.
2^4034 = 0 mod 8
2^4034 = k mod 125(we need to still find 'k')
Once we find 'k', then we apply CRT.
Why CRT?
Since CRT guarantees that there is a unique solution for X modulo (125*8) between 0 to 999(125*8-1).
Using Euler-totient theorem:
2^phi(125) = 1 mod 125 since 2 and 125 are co-prime.
phi(125) = 125*(1-1/5) = 100
2^100 = 1 mod 125
=> 2^4034 = 2^34 mod 125
2^10 = 1024 = 24 mod 125
2^34 = 24*24*24*16 mod 125 = 76*24*16 = 76*9 = 684 = 59 mod 125
So
2^4034 = 0 mod 8
2^4034 = 59 mod 125
2^4034 = 125k + 59
125k + 59 = 0 = 5k + 3 mod 8
=> 5k = -3 mod 8 => 5k = 5 mod 8 => k = 1 mod 8
2^4034 = 125k + 59 = 184 = answer
Q5. Determine last 3 digits of 374^2022.
S5.
Again to compute modulo 1000, we will break it down in 125,8.
374 mod 125 = -1
374^2022 mod 125 = +1
374 mod 8 = -2
374^2022 mod 8 = (-2)^2022 = 0 mod 8
X = 125k + 1 = 0 mod 8
=> 5k = -1 mod 8
=> 25k = -5 mod 8 = k => k = 3
X = 125*3 + 1 = 376 = Answer.
Comments
Post a Comment