Theorem:
Let
and
be two integers. Let
,
the greatest common divisor of
and
. We can find integers
and
and such that
Proof:
By reordering if necessary, we can assume
and
since,
if
or
,
the statement is trivial.
if
then
and
if we can prove it under this assumption then the general case follows, using
and/or
.
Let
be
the smallest integer such that there are integers
and
and
.
We need to show
is
a common divisor of
and
. If not, assume it does not divide
(
does
not divide
is essentially the same argument) , we have
with
So
and
On the other hand, If
is
a common divisor of
and
then
divides
. Since
Therefore
is the greatest common divisor
Again assume
,
if
divides
we are done since
.
If not
let
with
.
If
divides
,
it must also divide
,
so let
, and
Suppose
does
not divide
then
with
.
If
divides
,
as before, it also divides
and
hence
.
By back substitution
Suppose
does
not divide
then
with
and
so on. The process must terminiate in a finite number of
steps.
Corrollary:
In the setting above, again assuming
we
can select
such that
Proof: Exercise.
If
,begin
by finding an
and
such that
Definition:
Let
and
be
two integers such that
,
,and
then
and
are
said to be relatively
prime
Theorem:
Let
and
be
relatively prime Let
be a prime such that
divides
.
Then divides
divides
or
divides
.
Proof:
Suppose
does not divide
, then we can find
and
such that
Multiplying both sides of the equation by
,
we have
Since
divides both terms on the left side of the equation,
divides
Theorem:
Every integer
such
that
can be uniquely factored into a product of primes (perhaps times
)
Proof:
First show by an inductive argument that every such integer is either a prime or a product of primes. Then use the previous Theorem to show that the product is unique.
Godel Numbers - An Example:
Working with {A,B,C....,Z} coded as
{1,2,3....,25,26}
and the sequence of prime numbers
{2,3,5,7,11,.......}
where the
th prime is denoted by
.
encode a sequence of letters ,again as numbers,
as a single integer
. Because of unique factorization we can recover the original sequence.
Below, sometime our
calculations will be in
and
sometimes in the integers
. Hopefully, use of the phases " In
"
and " In
"
will clarify where the computations are taking place
and the conclusions that can be draw::
Some Examples
In
the
equation
is
uniquely solvable for
and
therefore, in
, we can also define the operation
.
If
then, in
, the solution to the equation
is
:
In
in general the equation
is
not solvable, however: If
and
are
relatively prime, as Integers then there is a unique
with
In
just
solve
, in particular
In
let
Exercise: We are assuming that,
in
let
"
makes sense in terms of existance and, uniqueness, why?:
and
,
as Integers, then in
the equation
is
uniquely solvable
Choose
with
,
as Integers.
Encryption -
Decryption -
Representing the letters of the alphabet
(A,B,....,Z) as
and looking at
with
,
as Integers,
Advantages: It is easy to compute and slightly better than
the Caesar Cyper in that there are
choices for
and
choices
for
(not
)
or
(
. That
is
possible codes.
Disadvantages: It is really just a Substitution
Cypher!
Plan B: Encode the entire
character ASCII table, and look at
with
,
as Integers.you would want to do this anyway. Still easy to compute and now
there are approximately
possible
codes. A bit harder but still subject to frequency analysis attacks.
Plan C: Use Affine Encryption to encode data in 4 byte
blocks say, using
You
could encode text 4 characters at a time.
Definition: Let
be the number of members of
relatively
prime to
,
as integers.
is
called the Euler Totient Function.
If
is
a prime then
If
where
are primes then
.
Theorem: Let
, then
Proof: (Unless otherwise noted all calculations will be in In
)
We can assume
(
) since if
,
and
then
and
Let
be
the subset of members relatively prime to
.
Since the
have
multiplicative inverses, one verifies that
So
Theorem: Suppose
are
pairwise relatively prime positive integers,
and
Suppose
are
integers. Then the system of simultaneous equations
has a unique solution
,
where
Proof: Let
and
, this is well defined
since
Exercise 1: Show
is a solution and is unique
Exercise 2:
Let
,
,
,
solve the simultaneous equations: