Once Again, about Greatest Common Divisor, the Euclidean Algorithm and a Little About the History of Algorithms in General. Of Course, with Swift Examples

Nikita Lazarev-Zubov
9 min readSep 23, 2019

Algorithms — one of the main topics of programming, they are everywhere (especially in job interviews, haha).

Algorithms everywhere meme
How can one possibly do without an old joke in such a post?!

One of the most famous is so-called the Euclidean algorithm — perhaps, the most common way to find the greatest common divisor (GCD) of two non-negative integers. They also love to start learning (and teaching) corresponding mathematics and computer science sections.

Donald E. Knuth, the notorious author of the treatise The Art of Computer Programming (but not only this one), thinks that it’s the first algorithm at all. Because although the algorithm was invented and had been used before Euclidus (who lived in IV-III centuries B.C.) — it was mentioned by Aristotle who lived a century earlier — Euclidus described it in an iterative manner which is consistent with the contemporary word meaning.

The word “algorithm” itself dates back to a Persian mathematician named al-Khwarizmi who lived in approximately VIII-IX centuries A.C. However, the time it began to be used in the contemporary meaning is believed to be XX century. More precisely, its first decades — the information technology rising.

--

--

Nikita Lazarev-Zubov
Nikita Lazarev-Zubov

Written by Nikita Lazarev-Zubov

Swift and general programming topics, Agile software development, soft skills

No responses yet