On Some Algebraic Properties of the Euclidean Algorithm with Applications to Real Life

The study analyzed the algebraic properties of the Euclidean algorithm in details. The analysis included a detailed step by step approach in understanding the algorithm, the extended form of the algorithm, computation of the Greatest Common Divisor (GCD) and its algebraic properties and their applications in algebra an d cryptography. We also showed how the Euclidean algorithm could be applied to trading for the maximization of returns. In our approach, we assumed that gcd[a(x); b(x)] is the monic polynomial of minimal degree within the set G = {s(x)a(x)+t(x)b(x): s(x), t(x) ∈ F[x]} and thus, examining all equations of the form p(x) = s(x)a(x)+t(x)b(x).


INTRODUCTION
The Euclidean Algorithm, the oldest algorithm that has survived the test of time is a very useful tool for calculating the greatest common divisor of two integers and for those matter two polynomials.This is attained through the use of the algorithm and its reciprocal subtraction (Glasby, 1999).
Properties of the Euclidean algorithm include the division algorithm, the inverse property and backward substitution.
These properties are applied in finding multiplicative inverses of integers and matrices in modulo arithmetic, least common multiple (events occurring together in different successive time intervals), trading, solving linear congruence in cryptography and modeling population growth (Honsberger, 1976).
The algorithm is also applied in music, agriculture, modeling rabbit birth rate, design of games and number theory (Narkiewicz, 2000).
In the 19 th century, application of the algebraic properties of the Euclidean algorithm led to the development of new number systems such as Gaussian and Eisenstein integers (Bashmakova, 1948;Fowler, 1999).
In music, there is a correspondence between ratios and intervals as well as a correspondence between the mathematical relationships of different ratios and the musical relationships of different intervals.For example, combining two musical intervals together, gives you another.A fourth plus a fifth is an octave; a major third plus a minor third is a fifth.More complicated musical intervals like semitones are usually defined by looking at the difference between some pair of more simple intervals, just as the tone was defined as the difference between a fifth and the fourth.Euclid's algorithm provides a way of dealing with equations of musical pitch, potentially helping musicians and instrument makers to tune musical instruments (Gerard, 1973).
The Euclidean algorithm is also used to design the Euclid's game.Playing the Euclid's game involves the use of the cognitive, psychomotor and effective domains thereby arousing and sustaining the interest of the individuals in mathematics.
The Euclidean algorithm has also been improved to form the lame's theorem which was used to develop the Fibonacci numbers (Knuth, 1997).
The stem Brocot tree is also an application of the Euclidean algorithm which enables us to find fine features, carry out binary encoding, continuous fraction on the stem Brocot tree and fractions on a binary tree.
The analysis of the Algebraic properties of the Euclidean algorithm has become necessary due to its usefulness.By analysis of the properties of the algorithm, we mean the determination of good bounds (especially upper) for the algorithm's consumption of resources such as time and space.Such bounds are generally expressed in terms of the size of the inputs, or in the case of integer inputs in terms of the inputs themselves.The analysis of the algorithm has become an important field of study in computer science and algebra.As Knuth (1970) post it in 1970, the advent high-speed computing machines which are capable of carrying out so faithfully has led to intensive studies of the properties of the algorithm, opening a fertile field for mathematical investigation.In this study, we present a detailed step by step approach in understanding the Euclidean algorithm, the extended form of the algorithm, computation of the Greatest Common Divisor (GCD) and its applications for the maximization of returns in trading.Further, we applied the division property to find the gcd, quotient and the remainder of algebraic expressions in a given modulo.

Description of the Euclidean algorithm:
Let F be a Field and a(x), b(x) be two polynomials such that a In particular, a(x) can be replaced in the calculation by its remainder r(x) upon division by b(x) Assuming that a(x) has degree as big as that of b(x), the remainder r(x) will have smaller degree than a(x); so the gcd of the original pair of polynomials will be equal to the gcd of a new pair with smaller total degree.We can continue by decreasing the degree of the remainder at each stage until the process stops with remainder 0 and at this point the gcd becomes clear.
In our study we assume that gcd(a(x); b(x)) is the monic polynomial of minimal degree within the set: G = {s(x)a(x)+t(x)b(x): s(x), t(x) ∈ F[x]}.Thus, we examine all equations of the form p(x) = s(x)a(x)+t(x)b(x).
Looking for one in which nonzero p(x) has minimal degree.The unique monic scalar multiple of this p(x) is then equal to gcd(a(x), b(x)).If we have two suitable equations: Then we can find a third with left hand side of smaller degree.Assume that the degree of m(x) is at least as big as that of n(x).By the Division Algorithm A.2, there are q(x) and r(x) with m(x) = q(x)n(x)+r(x) and deg(r(x)) <deg n(x)).Subtracting q(x) times Eq.(2) from Eq. (1) we have the desired: Next, we divide r(x) into n(x) and, using Eq. ( 2) and (3), further reduces the degree of the left hand side.Continuing as before, we must ultimately arrive at an equation with 0 on the left.The left hand side of the previous equation will then have the desired minimal degree.The benefit of this method of calculation is that, the appropriate polynomials s(x) and t(x) are produced at the same time as the greatest common divisor (gcd).
To succeed with this approach we must have two equations to begin with.These are provided by: Assume that deg(a(x))≥deg (b(x)) with a(x) ≠ 0. At Step i we construct the equation: , the appropriate initialization being provided by ( 4) and ( 5): Step i: Starting with r i-2 (x) and r i-1 (x), use the Division algorithm A.2 to define q i (x) and We then have the equation: Begin with i = 0.If we have r i (x) ≠ 0, then proceed to Step i+1.Eventually there will be an i with r i (x) = 0.At that point halt and declare gcd(a(x); b(x)) to be the unique monic scalar multiple of the nonzero polynomial r i-1 (x).

Proof:
; so i E holds.This also shows that: is the unique monic multiple of r i-1 (x), completing verification of the algorithm.Alternatively given a(x) and b(x) being two non-zero polynomials such that deg(a(x))> deg(b(x)) we can use finite division to get the greatest common divisor (gcd).The process is as follows: Note that r k (x) differ from the required greatest common divisor (gcd) by only a constant factor in F.
By reversing the above process we obtain polynomial:

RESULTS AND DISCUSSION
Finding events that occur together: Events that occur at successive time interval can be solved using the ordinary Least Common Multiple (LCM).If these events occur at a larger time interval, the LCM computation becomes tedious.The Euclidean algorithm then becomes the best alternative.Thus, given two events occurring at very large time intervals a and b respectively, we will have: This application is very useful when dealing with the production of the same commodities by different manufacturers.The fact is that, as the supply of the commodity increases, the demand reduces and prices go down.Manufacturers when aware of this occurrence will put the necessary measures in place to reduce losses.Again, this will help farmers avoid post-harvest losses.
Example: If two factories a and b manufactures a mowing machine every 299 and 221 days respectively, The number of days it will take for them to manufacture at the same time is calculated as follows: First, for the gcd(299, 221).We have: This means that on the 5083 day, the two factories will manufacture a mowing machine each.

Finding the remainder:
The finite division algorithm is used in the remainder theorem to find the remainder of algebraic expressions in a given modulo.This application is useful when sharing things.In higher levels, we use it to share a thing in a given number of parts (referred to as modulo).
Proof: ( −1 ) -1  −1 = () =  Post multiplying by , we obtain: Hence from ( 1) and (2) ( −1 )P -1 =  Finding inverses by the extended Euclidean algorithm (multiplicative inverse): When we are working in modular arithmetic, we often need to find the inverse of a number relative to an operation.When we are looking for an additive inverse it is relative to an addition operation and when a multiplicative inverse it is relative to a multiplication operation.Here, we mainly used the extended Euclidean algorithm to find the multiplicative inverse of b in Z n when n and b are given and the inverses exists.To show this, take two integers 0<b<a and consider the Euclidean Algorithm equations which yield gcd(a, b) = r j .Rewrite all of these equations except the last one, by solving for the remainders: Thus, the integer a ∈ Z n has a multiplicative inverse a -1 if and only if gcd(n, a) ≡ 1(mod n).

Example
Solving systems of congruencies: The inverse property of the Euclidean algorithm can be applied in solving certain systems of congruencies in cryptography that involves the arrangement of things in a given number of ways (referred to as modulo) and thus, battle problems.
Example: If a group of academic scholars in a conference can be fitted to 3 rows leaving 2 left, in 5 rows leaving 4 left and 7 rows leaving 6 left then the total number of scholars who attended the conference can be found as follows.
We translate it into the following system of congruencies: Therefore, there were 104 scholars at the conference Euclidean algorithm in trading: The Euclidean algorithm could also be applied to trading so as to maximize returns.In trading, retailers normally bid for reduction in prices of goods since they have to resell the commodities and make profit.They therefore price the goods in groups.Most often, some are added free to the retailers.In case there are more retailers, we can simplify their bid into linear congruence, applying the division and inverse property in determining the best bid so as to maximize profit.
Example: A wholesaler sells cartons of biscuits.Three retailers agree to buy the cartons in groups.
Retailer one agrees to buy them at every three for ₵ 55.00 of which two will be left and added free to the retailer.Retailer two agrees to buy them at every seven for ₵ 125.00 of which four will be left and given him free.Retailer three agrees to buy it in tens for ₵ 175.00 for which six will be left and added free.
To estimate how many cartons are to be sold we use linear congruence with the application of Euclidean algorithm: We first compute: Again, if the wholesaler agrees to sell to retailer one, he can sell six times of such cartons in a month.If he agrees to sell for retailer two, he can sell ten times of such cartons in a month.If he also agrees to sell for retailer three, he can sell sixteen times of such cartons in a month.To find which of these retailers the wholesaler should choose to make the maximum profit in a month and assuming the cost price of a carton of the biscuit is ₵ 15.00 with selling price of ₵ 20.00 per carton, we look for the profit on each retailer.Thus, the total number of cartons is 116.For agreement with retailer one: Hence the wholesaler should agree to do business with retailer three so as to maximize profit for that month.
Backward substitution and the general difference equation formula: Backward substitution is also another important property of the Euclidean algorithm.This is seen when we try to make the greatest common divisor (gcd) the subject, carry out series of substitutions until the multiplicative inverse is obtained.This important property is useful in generating the general term of a number of mathematics formulae involving series.It can be applied also in statistics when finding the dual of an autoregressive process.Besides, it can be applied in difference equations to find composite formula when modeling population growth.
In modeling population growth, this property is very useful.Let x 0 be the initial population of an area, α be the growth rate of the population and x n be the general term then:
Step n:   = α   − = α   0 By obtaining the composite formula, we can find the population at any time t without wasting time to calculate the preceding populations.
Example: Suppose the population of bats increases at a constant rate of 2% each year and the initial population of the bats is 100: • Deduce a formula to model the population of the bats in subsequent years.• What will be the population of the bats in 30 years' time? Solution: • Let  0 = 100 and rate of increase α = 1.02

CONCLUSION
The study identified the inverse as an algebraic property of the Euclidean algorithm.This property has been applied in trading to maximize profit and used to find the inverse of numbers and matrices in a given modulo and further in cryptography to solve linear congruence problems.
Further, we applied the division property to find the gcd, quotient and the remainder of algebraic expressions in a given modulo.It was also used to find when two events occurring at successive time interval will occur together so as to prepare for their occurrences.Finally, the study provided an easier way of proving the Euclidean algorithm.
All workings are performed in  7 () appropriately.
in the last of these equations,   =   −2 −   −1   , replace   −1 with its expression in terms of   −3 and   −2 from the equation immediately above it.Continue this process successively, replacing   −2 ,   −3 , … … .., until you obtain the final equation:   =  +  With x and y integers.In special cases that gcd(a, b) = 1, the integer equation reads: 1 =  +  Therefore we deduce: So that (the residue of) y is the multiplicative inverse of b mod a.