Friday, May 06, 2005

Greatest Common Divisor

The Greatest Common Divisor or gcd is the largest common factor between two numbers. In what follows, I will write this as function such as gcd(9,6) = 3. The gcd cannot be applied to 0.

For example, the gcd(2,4) = 2 and gcd(5,7)=1.

One assumption that I will use below is the Well Ordering Principle.

Postulate 1: Well Ordering Principle

For any set of positive integers, one value is the lowest.

For a small set of numbers, this principle is clearly true.

For the set of all negative numbers, it is not true. No matter which negative number we choose, we can always find another negative number which is lower.

For the set of all positive numbers, it is true. It is 1. Likewise, it is true for all subsets of this set.

This principle is normally called a postulate. A postulate is an assumption that mathematicians use without proof. It is the foundation of a proof.

Lemma 1: Bezout's Identity: If gcd(a,b) = c, then there exists s,t such that: c = as + bt.

(1) Let S be a set { am + bn : m,n are integers, am + bn > 0 }

In other words, let S be the set of all sums that can be created from am + bn. This includes (1)m + (1)n, (2)m + (1)n, etc. It includes any combination. So, we can also assume that (1000)m + (99)n are elements of this set if the sum is greater than 0.

(2) This set is not empty

In other words, for any a, b, we know that there is at least one element in this set.

If a + b > 0, then choose m=1,n=1.

If a + b = 0, then either a or b is negative. Let's assume a. Then choose m=-1,n=1.

If a + b is less than 0, then either a or b is the lowest. Let's assume a. Then choose m=-1,n=1.

(3) We know that one of these elements in the set is the smallest. [By the Well Ordering Principle]

(4) Let's call the smallest element d.

(5) d divides both a,b.

I will now show that d divides a. The same argument will also apply to b.

We know that there exists q,r such that a = dq + r where r is a positive integer less than d. [By the Division Algorithm]

In other words, q is the quotient and r is the remainder.

r = a - dq = a - (as + bt)q = a - asq - btq = a(1 - sq) - btq = a(1-sq) + b(-tq).

Assume that r > 0.

Then a(1 - sq) + b(-tq) is an element of the above set.

But this is a contradiction. d is the lowest element and yet here is an element smaller than d.

So, r = 0.

(6) d is the gcd for a,b.

Let d' = gcd(a,b)

Let's define h,k: a = d'h, b = d'k

So, d = as + bt = (d'h)s + (d'k)t = d'(hs + kt)

Which means d' divides d.

So, d' = d since d' is the gcd.

QED

Lemma 2: For all pairs of numbers, it is possible to reduce them to a form that is coprime.

(1) Assume that we have two numbers: x, y that are not coprime.
(2) Then there exists d such that d = gcd(x,y) and d > 1.
(3) Then there exists X,Y such that x = dX, y = dY.
(4) And finally, gcd(X,Y)=1
(a) Assume gcd(X,Y) = D and D > 1
(b) Then there exists a,b such that X = aD, Y = bD.
(c) And x = d(aD), y = d(bD)
(d) From this, we see that dD divides both x and y.
(e) We also know dD > d since d > 1 and D > 1.
(f) But this is a condradiction since d is the greatest common denominator.
(g) So we reject our assumption.
QED

Wednesday, May 04, 2005

CoPrime Numbers: xn + yn = zn

This blog is about the equation:
xn + yn = zn

I will show that given any three integers that satisfy this equation, either:

(a) all three of them are coprime with each other

or

(b) it is possible to cancel out common components and derive three numbers that are coprime.

Two numbers are coprime if they do not share any common divisors.

Definition 1: Coprime

Two numbers x,y are said to be coprime if and only if d divides x, d divides y -> d = 1

Two numbers x,y are said to not be coprime if and only if there exists a value d > 1 such that d divides x, d divides y


Now, here's the proof that was promised:

Lemma: We can reduce any solution to xn + yn = zn to a form where x,y,z are coprime.

To prove this, we will need to prove two things:

(1) If a factor divides any two values of this equation, then the n-power of it divides the n-power of the third value.

(2) If an n-power of a factor divides the n-power of a value, then the factor divides the value itself.

Step 1: For xn + yn = zn, the n-power of any common factor of two divides the n-power of the third.

Case I: Let's assume d divides x, d divides y

(1) There exists x', y' such that: x = d(x'), y = d(y')
(2) zn = xn + yn = (dx')n + (dy')n
= dn(x')n + dn(y')n
= dn[(x')n + (y')n]

Case II: Let's assume d divides z and d divides x or d divides y

(1) Let's assume d divides x (the same argument will work for y)
(2) There exists x', z' such that: x = d(x'), z = d(z')
(3) We now say yn = zn - xn
(4) We can now follow the same reasoning as above.

QED

Step 2: dn divides xn → d divides x

(1) Let c be the greatest common denominator (gcd) for d,x.
(2) Let D = d / c, X = x / c.
(3) Now the gcd of (X,D) = 1. [See here for the explanation]
(4) So, the gcd of (Xn,Dn) = 1.
(5) We know that there exists k such that xn = k * dn [Since dn divides xn ]
(6) Applying (2), we get (cX)n = k*(cD)n
(7) Which gives us: cnXn = k * cnDn
(8) Dividing cn from each side gives: Xn = Dn*k
(9) Now it follows that gcd(Dn,k) = 1.
(a) Assume gcd(Dn,k) = a, a > 1
(b) Then, a divides Dn and Xn [From 8]
(c) But gcd(Dn,Xn) ≠ 1.
(d) But this contradicts (4)
(e) So, we reject our assumption.
(10) So, we can conclude that k is an n-power. [See blog on Infinite Descent for the proof]
(11) Which means that there exists u such that un = k.
(12) And we get Dn * un = Xn
(13) And (Du)n = Xn
(14) Implying that Du = X and multiplying by c that du=x.
(15) Which proves that d divides x.

QED

Monday, May 02, 2005

Exponents

1. Introduction to Exponents

An exponent is an elegant shorthand for multiplication.

Instead of 5 * 5 * 5, you can write 53

Instead of 3 * 3 * 3 * 3 * 3 * 3 * 3, you can write 37

The number that gets multiplied is called the base. The number of multiplications that occur is called the power. So, in the above example, 3 is the base and 7 is the power.

Of course, this method only applies when the power is a positive integer. Later on, I will discuss what it means when a power is 0, positive, or even a fraction.

So 42 = 4 * 4 = 16

And 43 = 4 * 4 * 4 = 64

And 41 = 4 = 4

2. x and y notation

In mathematics, when we want to talk about "any", we use a letter such as x or y or z. For example, if we wanted to say that 1 to any power equals 1, we could write this as follows:

1x = 1

Using x-and-y notation, we can create a definition for the positive exponents.

Definition 1: Positive Exponents
xy means x multiplied with itself y times.

x is called the base

y is called the power

3. Multiplication of Exponents

Multiplying exponents of the same base can be determined based on the above definition.

42 * 43 =
= (4 * 4) * (4 * 4 * 4)
= 4 * 4 * 4 * 4 * 4
= 45

So, when exponents get multiplied, if they have the same base, you can add the powers and create a new exponent.

Here are some more examples:

55 * 510 = 515

210 * 21000 = 21010

Of course, this does not work if two exponents have a different base.

In mathematics, a method such as this can be presented as a theorem. A theorem is any statement that can be derived from previous results.

In this case, we are able to prove a theorem regarding the method of adding the powers of the same base. Here's the theorem

Theorem 1: xy * xz = x(y+z)
(1) We know that xy = x multipled to itself y times and that xz = x multipled to itself z times. (Definition of Positive Exponents).
(2) Multiplying all those x's, we have (y + z) x's multiplied together.
(3) Now x multiplied to itself (x + z) times = x(y + z) by the Definition of Positive Exponents.

QED
QED is put at the end of a proof to show it is done. It is an abbreviation for a latin phrase that means basically that the proof is finished. It serves the same purpose in a proof as a period does in a sentence.

4. Division of Exponents

To talk about division, it is useful to introduce the following definition:

Definition 2: Division
a = b / c means a is equal to b divided by c.

a is refered to as the quotient.

b is refered to as the dividend.

c is refered to as the divisor.
Division with exponents of the same base can also be determined based on the definition for positive exponents:

42 / 41 =
= ( 4 * 4 ) / ( 4 ) =
= 16 / 4 = 4
= 41

To divide two exponents of the same base, you simply subtract the two powers.

Here are some examples:

53 / 51 = 52

410 / 45 = 45

Now, what happens if we are dividing by a number greater than the top (in other words, where the divisor is greater than the dividend)? In this case, we are left with a fraction.

51 / 53 = 1 / 52

45 / 410 = 1 / 55

This leads us to a third definition:

Definition 3: Negative Exponents
x(-y) means that we have a fraction of 1 over x multiplied by itself y times.
Here are some examples.

5-1 = 1 / 5

4-3 = 1 / 43

And what happens if the subtraction results in 0?

We can answer this with the following theorem:

Theorem 2: x0 = 1
(1) By basic arithemitic, we know that
x0 = x(1 - 1)
(2) Since 1 - 1 = 1 + (-1), we can rewrite this as:
x(1 + -1)
(3) Now x(1 + -1) = x1 * x(-1) by Theorem 1.
(4) Now, x(-1) = 1/x, by Definition 3.
(5) So, we are left with x * (1/x) = 1

QED
We can also introduce a corollary to this theorem. A corollary is a small proof that is derived directly from the logic of a theorem.

Corollary 2.1: x0 = 1 implies that x ≠ 0
(1) Now x0 = x(1 - 1)
(2) Which means that x0 = x / x
(3) But this implies that x ≠ 0 since division by 0 is not allowed.

QED
Another way of saying this result is that 00 just like 0/0 or even 1/0 is undefined.

We can summarize division of exponents with the following theorem.

Theorem 3: xy / xz = x(y - z)
Case I: y = z

In this case xy / xz = 1 = x0 = x(y - z).

Case II: y > z

In division, we are able to cancel out all the common factors. Since y > z, we cancel out z factors from both dividend and divisor and we are left with x(y-z).

Case III: y < z
Again, we cancel out common factors. Since z > y, we are left with a fraction of
1 / [x(z-y)] which, by definition 3, equals x(-(z-y)) = x(y-z)

QED
5. Fractional Exponents

There is more that we can talk about. What about fractional exponents such as x(1/2)?

It turns out that based on our definitions, corrolaries, and theorems, we are now ready to take on fractional exponent.

Let's start with 1/2.

We know that x1/2 * x1/2 = x(1/2 + 1/2) by Theorem 1.
Now x(1/2 + 1/2) = x(1) = x.
So x1/2 is none other than the square root of x.

Let's start out by looking at a definition for what a root is.

Definition 4: an nth root of x is a number that multiplied n times equals x.

Sometimes, nth roots are whole numbers. The cube root of 27 is 3 since 3 * 3 * 3 = 27.

Likewise, the 4th root of 16 is 2.

1 is its own 5th root since 1 * 1 * 1 * 1 * 1 = 1.

This gives us our last theorem:

Theorem 4: x1/n = the nth root of x

(1) x1/n multiplied by itself n times equals x1/n + 1/n + 1/n + etc..
(2) Now 1/n + 1/n + etc. n times equals n/n which equals 1.
(3) Therefore x1/n multipled by itself n times equals x1
(4) And this is the very definition of an nth root.

QED