Download Math 4: Homework due 21 January

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Positional notation wikipedia , lookup

Large numbers wikipedia , lookup

Approximations of π wikipedia , lookup

Location arithmetic wikipedia , lookup

Quadratic reciprocity wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Factorization of polynomials over finite fields wikipedia , lookup

Addition wikipedia , lookup

Elementary mathematics wikipedia , lookup

Arithmetic wikipedia , lookup

Proofs of Fermat's little theorem wikipedia , lookup

Transcript
Math 6 Homework due 20 May
Euclid’s Algorithm
Euclid’s Algorithm to find greatest common divisor (gcd): Euler’s Algorithm is
an easy way to find the gcd of two large numbers. First write the two numbers in
separate columns (it will work with the numbers in either order, but you will save
a step if you put the larger number on the left. Why?). We’ll call the number on
the left ‘left-number’ and the number on the right ‘right number’. Compute the
remainder of ‘left-number’ divided by ‘right-number’ and put the result beneath
‘right-number’. Copy ‘right-number’ into the left column next to the modulo
result you just computed.
Now, if the modulo you just computed is zero, you are done and the result is the
other number in the last row. If it is not zero repeat the process. Here is an
example:
Find the gcd of 294 and 210:
294
210
84
42
210
84
42
0
The result is 42.
Now try it yourself!
1) Find the gcd of 39 and 26
2) Find the gcd of 310 and 434
3) Find the gcd of 3429 and 2667
The least common multiple of two numbers a and b, can be found by multiplying
the two numbers and dividing by the gcd.
lcm (a, b) 
ab
gcd( a, b)
4) Find the lcm of 310 and 434 (you already computed the gcd of 301 and 434)
Multiplicative Inverses
Any two numbers A and B that multiply together to get 1 are multiplicative
inverses of each other. We discussed that 5 and 1/5 are multiplicative inverses in
our usual arithmetic. Multiplicative inverses exist in modulo systems too, for
instance 2 times 6 is 12, which is 1 in the modulo 11 system. So 2 and 6 are
multiplicative inverses in modulo 11. In class we computed the multiplicative
inverses of all the numbers in the modulo 11 system (except for zero, which has
no inverse). We also noted that some systems, like the modulo 10 system have
many members without multiplicative inverses. They aren’t as much fun.
We can use the multiplicative inverse to solve problems like:
X = 7/6
(mod 11)
First we multiply both sides by 6 to clear the denominator
6X = 7
Then we multiply both sides by 6’s multiplicative inverse (which is 2)
12X = 14
These numbers expressed in the modulo 11 system is our answer:
X=3
At first, it looks odd that 7/6 = 3, but this is correct for the modulo 11 system.
What can you expect from a system where 10 + 1 = 0?
Solve the following in modulo 11:
5) X = 3/8
6) X = 3/8 + 3/8
7) X = 3/8 + 5/8
8) 3X + 6 = -1X + 9
Finding Shortcuts:
For the next class, we set ourselves a goal of computing the remainder of
21631065374 when divided by 11. That’s a big number, so let’s look at ways of
simplifying this type of calculation:
Example: What is the remainder of 8362 divided by 3?
Solution: Let’s write this as rem3(8362) where rem3(X) means the remainder
when X is divided by 3. We can express rem3(8362) as:
rem3(8362) = rem3(8 x 103 + 3 x 102 + 6 x 10 + 2)
provided we do all the arithmetic in modulo 3, we can distribute the rem3:
rem3(8362) = rem3(8 x 103) + rem3(3 x 102) + rem3(6 x 10) + rem3(2)
we distribute the ‘rem’ into all the product terms:
rem3(8362) = rem3(8) x rem3(103) + rem3(3) x rem3(102) + rem3(6) x rem3(10) + rem3(2)
We can calculate that remainder of 10 divided by 3 is:
rem3(10) = 1
Similarly, rem3(100) = rem3(10 x 10) = rem3(10) x rem3(10) = 1 x 1 = 1. In fact,
we can extend the argument to see that the remainder of any power of 10 will be
1. Going back to our problem we can take advantage of this:
rem3(8362) = rem3(8) x 1 + rem3(3) x 1 + rem3(6) x 1 + rem3(2)
rem3(8362) = rem3(8) + rem3(3) + rem3(6) + rem3(2)
from here we can do it in our heads (remember to calculate in modulo 3):
rem3(8362) = 2 + 0 + 0 + 2
rem3(8362) = 1
So this was a lot of work, but we found something interesting: we can find the
remainder of any number divided by three by just adding the remainders of the
digits modulo 3. Since we can’t hope to calculate 21631065374 numerically, we
will need to develop shortcuts like this to solve our problem.
9) Find the remainder of 47 divided by 3.
10) Find the remainder of 91,436,790,323 divided by 3.
11) Can you find a similar rule for finding the remainder of any number divided by 9?