Euclidean Algorithm is very useful when finding the greatest common divisor. Before we start what is the Euclidean Algorithm, you should know what algorithm means. The common understanding is that algorithm is a sequence of steps that solves a problem. Whether it is used for programming or solving a mathematical equation, we use algorithms to get solutions. Many people think the algorithm is only used to give commands to a computer, they are not entirely wrong. You will see that algorithms are mostly used in the computer field but not every time, you will see that we construct a set of rules to solve a problem such as in this article. Yes! you will learn how you can develop a series of rules that will help you to find the highest common divisor.

Euclid's algorithm is a procedure for calculating the greatest common divisor (GCD) of any two numbers. Greatest common divisor (GCD) is the highest positive integer that can divide two or more than two numbers for example, let's take 2 numbers which are 10 and 20. You can get many factors like 2, 5, and 10 but when we will talk about the greatest or highest common divisor than it will be only 10. The reason is simple, GCD means the greatest number which can divide both numbers and in the above example, it can only be 10. At this point, you might be wondering we don't need a huge algorithm to find GCD, we just did it in just a single step in the above example but that was a very simple example, things get complicated when a big number is introduced let's say 232:542? Then you will need Euclid's Algorithm to solve it.

How to use Euclid's Algorithm

The formula of Euclid's algorithm is pretty simple but when it comes to solving a problem then it will become complicated. Below is how you find GCD(A, B) by using the Euclidean Algorithm:

  • If A=0 that means GCD(A, B) will be equal to B because A=0 means GCD(0, B) and hence you get the answer B, and then only you can stop the algorithm.
  • If B=0 that means GCD(A, B) will be equal to A because B=0 means GCD(A, 0) and hence you get the answer A, and then only you can stop the algorithm.
  • You need to write A in the form of quotient remainder (i.e. A = B \times Q + R)
  • Find GCD(B, R) using the Euclid's Algorithm since GCD(A,B) = GCD(B, R)

Let's use this algorithm to find the GCD(72,16). These are the steps that you need to follow to obtain GCD.

Step 1

Divide the largest number by the smallest. In the above example, the largest number is 72 while the smallest number is 16. This means that you need to divide 72 by 16 which will give you 4 and a remainder of 8 but before doing this all, you need to remember something and that is to check the values are either zero or not. In the above example, both A \neq 0 and B \neq 0 which indicates that we can use the long division to solve it. Hence, \frac { 72 }{ 16 } = 4 with remainder 8. You need to present it in the form of quotient remainder: 72 = (16 \times 4) + 8.

Since you find that the GCD(72, 16) = GCD(16, 8) but we can't stop here because the only condition to terminate this algorithm is to get either A = 0 or B =0 hence we will again divide the largest number (which is 16) with the smallest number (which is 8): 16 = (8 \times 2) + 0, now we got remainder zero which means B = 0 and now we will stop.

Step 2

If:

1. The division is exact, the divisor is the GCD.

2. The division is not exact, divide the divisor by the remainder obtained and continue in this process to obtain an exact division. The last divisor is GCD.

GCD (72, 16) = 8

The best Maths tutors available
1st lesson free!
Ayush
5
5 (27 reviews)
Ayush
£90
/h
1st lesson free!
Intasar
4.9
4.9 (23 reviews)
Intasar
£42
/h
1st lesson free!
Dr. Kritaphat
4.9
4.9 (6 reviews)
Dr. Kritaphat
£39
/h
1st lesson free!
Matthew
5
5 (17 reviews)
Matthew
£25
/h
1st lesson free!
Paolo
4.9
4.9 (11 reviews)
Paolo
£25
/h
1st lesson free!
Petar
4.9
4.9 (9 reviews)
Petar
£27
/h
1st lesson free!
Myriam
5
5 (15 reviews)
Myriam
£20
/h
1st lesson free!
Andrea
5
5 (12 reviews)
Andrea
£40
/h
1st lesson free!
Ayush
5
5 (27 reviews)
Ayush
£90
/h
1st lesson free!
Intasar
4.9
4.9 (23 reviews)
Intasar
£42
/h
1st lesson free!
Dr. Kritaphat
4.9
4.9 (6 reviews)
Dr. Kritaphat
£39
/h
1st lesson free!
Matthew
5
5 (17 reviews)
Matthew
£25
/h
1st lesson free!
Paolo
4.9
4.9 (11 reviews)
Paolo
£25
/h
1st lesson free!
Petar
4.9
4.9 (9 reviews)
Petar
£27
/h
1st lesson free!
Myriam
5
5 (15 reviews)
Myriam
£20
/h
1st lesson free!
Andrea
5
5 (12 reviews)
Andrea
£40
/h
First Lesson Free>

Examples

Q. Find GCD(56, 12) with the help of the Euclidean Algorithm.

A \neq 0 \qquad B \neq 0

\frac { 56 }{ 12 } = (12 \times 4) + 8

GCD (56, 12) = GCD (12, 8)

A \neq 0 \qquad B \neq 0

\frac { 12 }{ 8 } = (8 \times 1) + 4

GCD (12, 8) = GCD (8, 4)

A \neq 0 \qquad B \neq 0

\frac { 8 }{ 4 } = (4 \times 2) + 0

A \neq 0 \qquad B = 0

Hence, GCD(56, 12) = 8

Need a Maths teacher?

Did you like the article?

1 Star2 Stars3 Stars4 Stars5 Stars 5.00/5 - 1 vote(s)
Loading...

Emma

I am passionate about travelling and currently live and work in Paris. I like to spend my time reading, gardening, running, learning languages and exploring new places.