Chinese Remainder Theorem Part 1 Modular arithmetic Part

  • Slides: 11
Download presentation
Chinese Remainder Theorem Part 1: Modular arithmetic Part 2: Sun-Tsu’s problem Part 3: Chinese

Chinese Remainder Theorem Part 1: Modular arithmetic Part 2: Sun-Tsu’s problem Part 3: Chinese Remainder Theorem Part 4: Some more famous problems Relatively prime Divisor Divides Congruent Inverse (multiplicative)

Modular Arithmetic �a = b mod n 13 divided by 12 has a remainder

Modular Arithmetic �a = b mod n 13 divided by 12 has a remainder of 1 13 is congruent to 1 mod 12 13 = 1 + 12 n 13 = 1 mod 12

Modular Arithmetic �If a = b mod n; then n divides a-b �If a

Modular Arithmetic �If a = b mod n; then n divides a-b �If a = b mod n and c = d mod n; then (a+c) = (b+d) mod n �If a = b mod n and c = d mod n; then (a-c) = (b-d) mod n �If a = b mod n and c = d mod n; then ac=bd mod n �If p is prime and a ≠ 0 mod p then there exists a b such that ab = 1 mod p

Modular Arithmetic Multiplicative Inverses �If p is prime and a ≠ 0 mod p

Modular Arithmetic Multiplicative Inverses �If p is prime and a ≠ 0 mod p then there exists a b such that ab = 1 mod p �What is an inverse? �Example: Mod 7

Sun-Tsu’s Problem �The original form of theorem was contained in the 3 rd-century book

Sun-Tsu’s Problem �The original form of theorem was contained in the 3 rd-century book Sunzi's Mathematical Classic (孫子 算經) by the Chinese mathematician Sun Tzu. �There are certain things whose number is unknown. When divided by 3 the remainder is 2, when divided by 5, the remainder is 3, when divided by 7 the remainder is 2. What is the number of things?

Sun-Tsu’s Problem �There are certain things whose number is unknown. When divided by 3

Sun-Tsu’s Problem �There are certain things whose number is unknown. When divided by 3 the remainder is 2, when divided by 5, the remainder is 3, when divided by 7 the remainder is 2. What is the number of things? x = 2 mod 3 x = 3 mod 5 x = 2 mod 7

Chinese Remainder Theorem Let m 1, m 2, . . . , mk be

Chinese Remainder Theorem Let m 1, m 2, . . . , mk be pairwise relatively prime. Then the system: x= a 1 mod m 1 x= a 2 mod m 2 x= ak mod mk Has one unique solution modulo M, where M= m 1 x m 2 x. . . x mk This solution can be found in the form: x = a 1 M 1 y 1 + a 2 M 2 y 2 +. . + ak. Mkyk Were Mk = M/mk and Mkyk = 1 mod mk

Your turn… I’m thinking of a number… �When divided by 4 the remainder is

Your turn… I’m thinking of a number… �When divided by 4 the remainder is 3 �when divided by 7, the remainder is 2 �when divided by 9 the remainder is 1 What is my number?

Pirates! A band of 17 pirates stole a sack of gold coins. When they

Pirates! A band of 17 pirates stole a sack of gold coins. When they tried to divide the fortune into equal portions, 2 coins remained. In the ensuing brawl over who should get the extra coins, one pirate was killed. The wealth redistributed, but this time an equal division left 10 coins. Again an argument develop, another pirate was killed. But now the total was evenly distributed among the pirates. What was the least number of gold coins that could have been stolen?

Eggs A girl was carrying a basket of eggs, and a man driving a

Eggs A girl was carrying a basket of eggs, and a man driving a horse hit the basket and broke all the eggs. Wishing to pay for the damage, he asked the girl how many eggs there were. The girl said she did not know, but she remembered that when she counted them by twos, there was one left over; when she counted them by threes, there were two left over; when she counted them by fours, there were three left over; when she counted them by fives, there were four left; and when she counted them by sixes, there were five left over. Finally, when she counted them by sevens, there were none left over. `Well, ' said the man, `I can tell you how many you had. ' What was his answer?

References �http: //www. math. harvard. edu/~knill/crt/lib/Kangshe ng. pdf �http: //sms. math. nus. edu. sg/smsmedley/Vol-301/The%20

References �http: //www. math. harvard. edu/~knill/crt/lib/Kangshe ng. pdf �http: //sms. math. nus. edu. sg/smsmedley/Vol-301/The%20 History%20 of%20 the%20 Chinese%20 Remin der%20 Theorem%20(Law%20 Huang%20 lng). pdf �http: //www. cut-the-knot. org/blue/chinese. shtml �http: //mathworld. wolfram. com/Chinese. Remainder. Th eorem. html