Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
any rational number is a sum of unit fractions∗ Mathprof† 2013-03-21 14:25:19 Representation Any rational number ab ∈ 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 ≤ ab < 1 as such a sum: 1. Let b n= a be the smallest natural number for which 2. Output 1 n 1 n ≤ ab . If a = 0, terminate. as the next term of the sum. 3. Continue from step 1, setting a0 a 1 = − . 0 b b n Proof of correctness Proof. The algorithm can never output the same unit fraction twice. Indeed, 1 < n2 – so the same n cannot be any n selected in step 1 is at least 2, so n−1 selected twice by the algorithm, as then n − 1 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. ∗ hAnyRationalNumberIsASumOfUnitFractionsi created: h2013-03-21i by: hMathprofi version: h33127i Privacy setting: h1i hDerivationi h11A67i † This text is available under the Creative Commons Attribution/Share-Alike License 3.0. You can reuse this document or portions thereof only if you do so under terms that are compatible with the CC-BY-SA license. 1 For a > 0: The n selected in step 1 satisfies b ≤ an < b + a. So a 1 an − b − = , b n bn and 0 ≤ an−b < a – by the induction hypothesis, the algorithm terminates for ab − n1 . Problems 1. The greedy algorithm always works, but it tends to produce unnecessarily large denominators. For instance, 47 1 1 1 = + + , 60 3 4 5 but the greedy algorithm selects 12 , leading to the representation 47 1 1 1 = + + . 60 2 4 30 2. The representation is never unique. For instance, for any n we have the representations 1 1 1 = + n n + 1 n · (n + 1) So given any one representation of ab 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. 2