I've been learning the Euclidean algorithm and came across this simple problem.
101−1(mod203)
So I attempted it as such:
203=101(2)+1
So we got a gcd of 1, we can stop and do:
1=203−101(2)
And since it's mod 203, we have 101(2)
So shouldn't the answer be 2?
My textbook says it's 201,
help would be much appreciated, as this is confusing as ever.
Thanks.
Answer
Observe that
2⋅101=202=−1(mod203)⟹(101)−1=−2=201(mod203)
Or using the EA:
203=2⋅101+1⟹1⋅203+(−2)⋅101=1⟹
⟹101−1=−2(mod203)=201(mod203)
No comments:
Post a Comment