Examples based on Chinese Remainder Theorem
Steps to solve the system of congruences :
Step 1: Take the congruence with the largest modulus x
an (mod mn) then rearrange it as,
x=mnk+an
where k is an integer.
Step 2: Substitute x into the 2nd largest modulus mnk+an
an-1 (mod mn-1) then solve the congruence
Step 3: Rewrite the congruence as k= mn-1d+h and substitute it in x.
Step 4: Substitute the solve equation of x in the next largest modulus then solve the congruence.
Step 5: Repeat the above steps until the solution arrives.
Chinese Remainder Theorem
Examples:
If you have a bowl of chocolates but the exact number is unknown and you distribute it among 3 children you have 2 leftovers, you distribute it among 5 children and have 3 leftovers, you distribute it among 7 children and have 2 leftovers. How many chocolates are there??
Soln:
According to question,
First, take the congruence with the largest modulus,
Rewrite it as an equivalence equation,
x=7k+2 ,for some integer k ……(1)
Substitute x into second largest modulus,
By solving the linear congruence,
We get,
Rewrite it as an equivalence equation,
k=5a+3,for some integer a
Substituting this in equation (1),
x=7(5a+3)+2
Substitute x into third largest modulus,
By solving the linear congruence,
We get,
Rewrite it as an equivalence equation,
a=3n,for some integer n
Substituting this in equation (2),
x=35a+23
=35(3n)+23
=105n+23
Rewriting this,
Note that, M=3x5x7=105
x=23
Therefore, the number of chocolates in the bowl is 23.
Soln:
Begin with the largest modulus,
Rewriting it,
x=7k+5 ,for some integer k ……(1)
Substitute x into second largest modulus,
Solving the congruence,
We get,
Rewriting it,
k=4a,for some integer a
Substituting this in equation (1),
x=7(4a)+5
Substitute x into third largest modulus,
Solving the congruence,
We get,
Rewriting it,
a=3n,for some integer n
Substituting this in equation (2),
x=28a+5
=28(3n)+5
=84n+5
Rewriting this,
Here, M = 3x4x7= 84
Therefore, x=5
3. There is a ship where pirates have a stolen treasure, a box full of unknown numbers of gold coins. Somehow, they figured out that the gold coins are between 70 and 90. If they plan to distribute it among 8 pirates they’ll have 6 gold coins left, they distribute it among 7 pirates, they'll have 1 gold coin left, they distribute it among 5 pirates and they'll have 3 gold coins left. How many gold coins are there ???
Soln:
According to question,
Begin with the largest modulus,
Rewriting it,
x=8k+6 ,for some integer k ……(1)
Substitute x into second largest modulus,
Solving the congruence,
We get,
Rewriting it,
k=7a+2,for some integer a
Substituting this in equation (1),
x=8(7a+2)+6
Substitute x into third largest modulus,
Solving the congruence,
We get,
Rewriting it,
a=5n+1,for some integer n
Substituting this in equation (2),
x=56a+22
=56(5n+1)+22
=280n+56+22
=280n+78
Rewriting this,
Note that, M = 8x5x7 = 280
x=78
Therefore, there are 78 gold coins.
Great explained, becouse of examples now it gets very clear to me..👏👍
ReplyDelete😊
Delete