July 2018
Beginner
202 pages
5h 4m
English
Scenario
For this activity, we will be building a greedy algorithm to compute Egyptian fractions. Every positive fraction can be represented as a sum of unique unit fractions. A fraction is a unit fraction if its numerator is one and its denominator is a positive integer. For example, 1/3 is a unit fraction. Such a representation, for example, a sum of unique unit fractions, is called an Egyptian fraction, since it was used by the ancient Egyptians.
For example, the Egyptian fraction representation of 2/3 is 1/2 + 1/6. The Egyptian fraction representation of 6/14 is 1/3 + 1/11 + 1/231.
Aim
To implement a greedy algorithm to compute Egyptian fractions, as described previously. ...
Read now
Unlock full access