Question
How do we use Euclid’s division algorithm to find the HCF (Highest Common Factor) of two numbers step by step?
Solution — Step by Step
For any two positive integers and (where ), there exist unique integers (quotient) and (remainder) such that:
This is the foundation. The algorithm applies this lemma repeatedly.
To find HCF(, ) where :
- Apply the division lemma:
- If , then HCF = . Stop.
- If , replace with and with . Go to step 1.
Repeat until the remainder becomes 0. The last non-zero remainder is the HCF.
Step 1: (remainder = 35)
Step 2: (remainder = 7)
Step 3: (remainder = 0)
The last non-zero remainder is 7.
Always start with the larger number:
The remainder is 0 in the very first step. So:
This tells us 196 divides 38220 exactly.
The key insight: where is the remainder when is divided by .
This is because any common factor of and must also divide . And any common factor of and must also divide . So the set of common factors is the same, meaning the HCF is preserved.
flowchart TD
A["Find HCF of a and b"] --> B["Divide a by b: a = bq + r"]
B --> C{"Is r = 0?"}
C -->|"Yes"| D["HCF = b"]
C -->|"No"| E["Replace: a becomes b, b becomes r"]
E --> B
Why This Works
Euclid’s algorithm works because it reduces the problem size at each step without changing the answer. The pair is replaced by where , so the numbers get strictly smaller. Since we are working with positive integers that decrease at each step, the process must terminate — and it terminates when the remainder hits 0.
The algorithm is over 2300 years old and is one of the earliest known algorithms in mathematics. It is computationally very efficient, requiring at most about the number of digits steps.
Alternative Method
For small numbers, prime factorization is often faster: factorize both numbers, then take the product of common prime factors with the lowest powers. For example, and , so HCF . But for large numbers, Euclid’s algorithm is far more practical.
Common Mistake
Students sometimes apply the algorithm with (smaller divided by larger). While the algorithm still works (the first step just swaps them, since ), it wastes one step. Always start with to be efficient. More importantly, when showing work in CBSE exams, starting with confuses the examiner and may cost a step mark.