Chapter 11 End-of-Chapter Exercises Question 1 Solution : Compute (i) gcd(375, 825), (ii) gcd(51000, 81000), (iii) gcd(1789287, 237656), (iv) gcd(2587392, 157656) by the improved version of Euclid's algorithm.
The rule: if m < n, reverse them. If n = 0, the answer is m. Otherwise replace gcd(m, n) by gcd(n, m mod n), where m mod n is the remainder when m is divided by n.
The book carries out this algorithm in the long-division layout of Āryabhaṭa. Its Example 2 is exactly gcd(825, 375): 825 divided by 375 gives quotient 2 and remainder 75, and then 375 divided by 75 gives remainder 0, so the gcd is 75.

| Step | Problem | Division m = q × n + r | Next |
|---|---|---|---|
| 1 | gcd(375, 825) | m < n, so reverse | → gcd(825, 375) |
| 2 | gcd(825, 375) | 825 = 2 × 375 + 75 | gcd(375, 75) |
| 3 | gcd(375, 75) | 375 = 5 × 75 + 0 | n = 0, answer 75 |
| Step | Problem | Division m = q × n + r | Next |
|---|---|---|---|
| 1 | gcd(51000, 81000) | m < n, so reverse | → gcd(81000, 51000) |
| 2 | gcd(81000, 51000) | 81000 = 1 × 51000 + 30000 | gcd(51000, 30000) |
| 3 | gcd(51000, 30000) | 51000 = 1 × 30000 + 21000 | gcd(30000, 21000) |
| 4 | gcd(30000, 21000) | 30000 = 1 × 21000 + 9000 | gcd(21000, 9000) |
| 5 | gcd(21000, 9000) | 21000 = 2 × 9000 + 3000 | gcd(9000, 3000) |
| 6 | gcd(9000, 3000) | 9000 = 3 × 3000 + 0 | n = 0, answer 3000 |
The last non-zero remainder is 3000. Check: 51000 = 17 × 3000 and 81000 = 27 × 3000, and 17 and 27 have no common factor.
| Step | Problem | Division m = q × n + r | Next |
|---|---|---|---|
| 1 | gcd(1789287, 237656) | 1789287 = 7 × 237656 + 125695 | gcd(237656, 125695) |
| 2 | gcd(237656, 125695) | 237656 = 1 × 125695 + 111961 | gcd(125695, 111961) |
| 3 | gcd(125695, 111961) | 125695 = 1 × 111961 + 13734 | gcd(111961, 13734) |
| 4 | gcd(111961, 13734) | 111961 = 8 × 13734 + 2089 | gcd(13734, 2089) |
| 5 | gcd(13734, 2089) | 13734 = 6 × 2089 + 1200 | gcd(2089, 1200) |
| 6 | gcd(2089, 1200) | 2089 = 1 × 1200 + 889 | gcd(1200, 889) |
| 7 | gcd(1200, 889) | 1200 = 1 × 889 + 311 | gcd(889, 311) |
| 8 | gcd(889, 311) | 889 = 2 × 311 + 267 | gcd(311, 267) |
| 9 | gcd(311, 267) | 311 = 1 × 267 + 44 | gcd(267, 44) |
| 10 | gcd(267, 44) | 267 = 6 × 44 + 3 | gcd(44, 3) |
| 11 | gcd(44, 3) | 44 = 14 × 3 + 2 | gcd(3, 2) |
| 12 | gcd(3, 2) | 3 = 1 × 2 + 1 | gcd(2, 1) |
| 13 | gcd(2, 1) | 2 = 2 × 1 + 0 | n = 0, answer 1 |
The remainders shrink 125695, 111961, 13734, 2089, 1200, 889, 311, 267, 44, 3, 2, 1, 0. The last non-zero remainder is 1, so the two numbers have no common factor other than 1 (they are co-prime).
| Step | Problem | Division m = q × n + r | Next |
|---|---|---|---|
| 1 | gcd(2587392, 157656) | 2587392 = 16 × 157656 + 64896 | gcd(157656, 64896) |
| 2 | gcd(157656, 64896) | 157656 = 2 × 64896 + 27864 | gcd(64896, 27864) |
| 3 | gcd(64896, 27864) | 64896 = 2 × 27864 + 9168 | gcd(27864, 9168) |
| 4 | gcd(27864, 9168) | 27864 = 3 × 9168 + 360 | gcd(9168, 360) |
| 5 | gcd(9168, 360) | 9168 = 25 × 360 + 168 | gcd(360, 168) |
| 6 | gcd(360, 168) | 360 = 2 × 168 + 24 | gcd(168, 24) |
| 7 | gcd(168, 24) | 168 = 7 × 24 + 0 | n = 0, answer 24 |
The last non-zero remainder is 24. Check: 2587392 = 107808 × 24 and 157656 = 6569 × 24.
(i) 75, (ii) 3000, (iii) 1, (iv) 24. Even for 7-digit numbers, the division version needed only 13 steps at most.
