The GCD of given numbers is 1.
Step 1 :
Divide $ 98765 $ by $ 54321 $ and get the remainder
The remainder is positive ($ 44444 > 0 $), so we will continue with division.
Step 2 :
Divide $ 54321 $ by $ \color{blue}{ 44444 } $ and get the remainder
The remainder is still positive ($ 9877 > 0 $), so we will continue with division.
Step 3 :
Divide $ 44444 $ by $ \color{blue}{ 9877 } $ and get the remainder
The remainder is still positive ($ 4936 > 0 $), so we will continue with division.
Step 4 :
Divide $ 9877 $ by $ \color{blue}{ 4936 } $ and get the remainder
The remainder is still positive ($ 5 > 0 $), so we will continue with division.
Step 5 :
Divide $ 4936 $ by $ \color{blue}{ 5 } $ and get the remainder
The remainder is still positive ($ 1 > 0 $), so we will continue with division.
Step 6 :
Divide $ 5 $ by $ \color{blue}{ 1 } $ and get the remainder
The remainder is zero => GCD is the last divisor $ \color{blue}{ \boxed { 1 }} $.
We can summarize an algorithm into a following table.
| 98765 | : | 54321 | = | 1 | remainder ( 44444 ) | ||||||||||
| 54321 | : | 44444 | = | 1 | remainder ( 9877 ) | ||||||||||
| 44444 | : | 9877 | = | 4 | remainder ( 4936 ) | ||||||||||
| 9877 | : | 4936 | = | 2 | remainder ( 5 ) | ||||||||||
| 4936 | : | 5 | = | 987 | remainder ( 1 ) | ||||||||||
| 5 | : | 1 | = | 5 | remainder ( 0 ) | ||||||||||
| GCD = 1 | |||||||||||||||
This solution can be visualized using a Venn diagram.
The GCD equals the product of the numbers at the intersection.