SoatDev IT Consulting
SoatDev IT Consulting
  • About us
  • Expertise
  • Services
  • How it works
  • Contact Us
  • News
  • September 18, 2023
  • Rss Fetcher

The Gauss map [1] is the function

f(x) = frac{1}{x} - leftlfloor frac{1}{x}rightrfloor

where ⌊y⌋ is the floor of y, the greatest integer no larger than y.

I’ve written about this map a couple times before. First, I wrote about how this map is measure-preserving. Second, I wrote about the image at the top of the post, based on Michael Trott’s idea of extending the floor function to the complex plane and plotting it.

This post is a third take on the Gauss map, expanding on a comment by Giovanni Panti. His paper opens by saying

The fact that the euclidean algorithm eventually terminates is pervasive in mathematics. In the language of continued fractions, it can be stated by saying that the orbits of rational points under the Gauss map x ↦ x−1 −⌊x−1⌋ eventually reach zero.

What does the Gauss map have to do with continued fractions or the Euclidean algorithm? We’ll show this by working through an example.

A continued fraction has the form

a_0 + cfrac{1}{a_1+cfrac{1}{a_2+cfrac{1}{a_3+ddots}}}

Let’s start with 162/47 and see how we would write it as a continued fraction. An obvious place to start would be to write this as a proper fraction.

frac{162}{47} = 3 + frac{21}{47}

Next we turn 21/47 into 1 over something.

frac{162}{47} = 3 + frac{21}{47} = 3 + cfrac{1}{cfrac{47}{21}}

Now let’s do the same thing with 47/21: turn it into a proper fraction 2 + 5/21, then rewrite the fraction part 5/21 as the reciprocal of its reciprocal:

 frac{162}{47} = 3 + cfrac{1}{cfrac{47}{21}} = 3 + cfrac{1}{2 + cfrac{5}{21}} = 3 + cfrac{1}{2 + cfrac{1}{cfrac{21}{5}}

Finally, we write 21/5 as 4 + 1/5, and we’re done:

 frac{162}{47} = 3 + cfrac{1}{2 + cfrac{1}{4 + cfrac{1}{5}}}

Now go back and look at what happens to the fraction in the bottom left corner at each step:

 frac{162}{47} = 3 + frac{21}{47} = 3 + cfrac{1}{2 + cfrac{5}{21}} = 3 + cfrac{1}{2 + cfrac{1}{4 + cfrac{1}{5}}}

The sequence of bottom left fractions is 21/47, 5/21, 1/5. Each fraction is replaced by its Gauss map: f(21/47) = 5/21, and f(5/21) = 1/5. We applied the Gauss map above naturally in the process of creating a continued fraction.

Now suppose we wanted to find the greatest common divisor of 162 and 47 using the Euclidean algorithm.

Notice that these are the same numbers, produced by the same calculations as above.

[1] There are other things called the Gauss map, such as the map that takes a point on a surface to the unit normal at that point. That’s not the Gauss map we’re talking about here.

The post Gauss map, Euclidean algorithm, and continued fractions first appeared on John D. Cook.

Previous Post
Next Post

Recent Posts

  • Sage Unveils AI Trust Label to Empower SMB’s
  • How African Startups Are Attracting Global Fintech Funding
  • After its data was wiped, KiranaPro’s co-founder cannot rule out an external hack
  • Meet the Finalists: VivaTech’s 5 Most Visionary Startups of 2025
  • Trump fast-tracks supersonic travel, amid spate of flight-related executive orders

Categories

  • Industry News
  • Programming
  • RSS Fetched Articles
  • Uncategorized

Archives

  • June 2025
  • May 2025
  • April 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023

Tap into the power of Microservices, MVC Architecture, Cloud, Containers, UML, and Scrum methodologies to bolster your project planning, execution, and application development processes.

Solutions

  • IT Consultation
  • Agile Transformation
  • Software Development
  • DevOps & CI/CD

Regions Covered

  • Montreal
  • New York
  • Paris
  • Mauritius
  • Abidjan
  • Dakar

Subscribe to Newsletter

Join our monthly newsletter subscribers to get the latest news and insights.

© Copyright 2023. All Rights Reserved by Soatdev IT Consulting Inc.