You are here
Homeany rational number is a sum of unit fractions
Primary tabs
any rational number is a sum of unit fractions
Representation
Any rational number $\frac{a}{b}\in\mathbb{Q}$ between 0 and 1 can be represented as a sum of different unit fractions. This result was known to the Egyptians, whose way for representing rational numbers was as a sum of different unit fractions.
The following greedy algorithm can represent any $0\leq\frac{a}{b}<1$ as such a sum:
1. Let
$n=\left\lceil\frac{b}{a}\right\rceil$ be the smallest natural number for which $\frac{1}{n}\leq\frac{a}{b}$. If $a=0$, terminate.
2. Output $\frac{1}{n}$ as the next term of the sum.
3. Continue from step 1, setting
$\frac{a^{{\prime}}}{b^{{\prime}}}=\frac{a}{b}\frac{1}{n}.$
Proof of correctness
Proof.
The algorithm can never output the same unit fraction twice. Indeed, any $n$ selected in step 1 is at least 2, so $\frac{1}{n1}<\frac{2}{n}$ – so the same $n$ cannot be selected twice by the algorithm, as then $n1$ could have been selected instead of $n$.
It remains to prove that the algorithm terminates. We do this by induction on $a$.
 For $a=0$:

The algorithm terminates immediately.
 For $a>0$:

The $n$ selected in step 1 satisfies
$b\leq an<b+a.$ So
$\frac{a}{b}\frac{1}{n}=\frac{anb}{bn},$ and $0\leq anb<a$ – by the induction hypothesis, the algorithm terminates for $\frac{a}{b}\frac{1}{n}$.
∎
Problems
1. The greedy algorithm always works, but it tends to produce unnecessarily large denominators. For instance,
$\frac{47}{60}=\frac{1}{3}+\frac{1}{4}+\frac{1}{5},$ but the greedy algorithm selects $\frac{1}{2}$, leading to the representation
$\frac{47}{60}=\frac{1}{2}+\frac{1}{4}+\frac{1}{30}.$ 2. The representation is never unique. For instance, for any $n$ we have the representations
$\frac{1}{n}=\frac{1}{n+1}+\frac{1}{n\cdot(n+1)}$ So given any one representation of $\frac{a}{b}$ as a sum of different unit fractions we can take the largest denominator appearing $n$ and replace it with two (larger) denominators. Continuing the process indefinitely, we see infinitely many such representations, always.
Mathematics Subject Classification
11A67 no label found Forums
 Planetary Bugs
 HS/Secondary
 University/Tertiary
 Graduate/Advanced
 Industry/Practice
 Research Topics
 LaTeX help
 Math Comptetitions
 Math History
 Math Humor
 PlanetMath Comments
 PlanetMath System Updates and News
 PlanetMath help
 PlanetMath.ORG
 Strategic Communications Development
 The Math Pub
 Testing messages (ignore)
 Other useful stuff
 Corrections
Attached Articles
Corrections
broken by mps ✓
greedy algorithm by pahio ✘
needs rerendering by CWoo ✘