In mathematics, the greedy algorithm for Egyptian fractions is a greedy algorithm, first described by Fibonacci, for transforming rational numbers into Egyptian fractions. An Egyptian fraction is a representation of an irreducible fraction as a sum of distinct unit fractions, such as 5/6 = 1/2 + 1/3. As the name indicates, these representations have been used as long ago as ancient Egypt, but the first published systematic method for constructing such expansions was described in 1202 in the Liber Abaci of Leonardo of Pisa (Fibonacci). It is called a greedy algorithm because at each step the algorithm chooses greedily the largest possible unit fraction that can be used in any representation of the remaining fraction. Fibonacci actually lists several different methods for constructing Egyptian fraction representations. He includes the greedy method as a last resort for situations when several simpler methods fail; see Egyptian fraction for a more detailed listing of these methods. As Salzer (1948) details, the greedy method, and extensions of it for the approximation of irrational numbers, have been rediscovered several times by modern mathematicians, earliest and most notably by A closely related expansion method that produces closer approximations at each step by allowing some unit fractions in the sum to be negative dates back to . The expansion produced by this method for a number is called the greedy Egyptian expansion, Sylvester expansion, or Fibonacci–Sylvester expansion of . However, the term Fibonacci expansion usually refers, not to this method, but to representation of integers as sums of Fibonacci numbers. Fibonacci's algorithm expands the fraction to be represented, by repeatedly performing the replacement (simplifying the second term in this replacement as necessary). For instance: in this expansion, the denominator 3 of the first unit fraction is the result of rounding 15/7 up to the next larger integer, and the remaining fraction 2/15 is the result of simplifying −15 mod 7/15 × 3 = 6/45.
, , ,
Jian Wang, Matthias Finger, Lesya Shchutska, Qian Wang, Matthias Wolf, Varun Sharma, Konstantin Androsov, Jan Steggemann, Leonardo Cristella, Xin Chen, Davide Di Croce, Mingkui Wang, Zhirui Xu, João Miguel das Neves Duarte, Tagir Aushev, Tian Cheng, Yixing Chen, Werner Lustermann, Andromachi Tsirou, Alexis Kalogeropoulos, Andrea Rizzi, Ioannis Papadopoulos, Paolo Ronchese, Thomas Muller, Ho Ling Li, Giuseppe Codispoti, Hua Zhang, Siyuan Wang, Peter Hansen, Daniel Gonzalez, Tao Huang, David Vannerom, Michele Bianco, Kun Shi, Wei Shi, Abhisek Datta, Ji Hyun Kim, Donghyun Kim, Dipanwita Dutta, Zheng Wang, Sanjeev Kumar, Wei Li, Yong Yang, Yi Wang, Ajay Kumar, Ashish Sharma, Georgios Anagnostou, Joao Varela, Csaba Hajdu, Muhammad Ahmad, Ekaterina Kuznetsova, Ioannis Evangelou, Matthias Weber, Muhammad Shoaib, Milos Dordevic, Vineet Kumar, Vladimir Petrov, Francesco Fiori, Quentin Python, Meng Xiao, Hao Liu, Sourav Sen, Viktor Khristenko, Marco Trovato, Gurpreet Singh, Fan Xia, Xiao Wang, Bibhuprasad Mahakud, Jing Li, Rajat Gupta, Lei Feng, Muhammad Waqas, Hui Wang, Seungkyu Ha, Davide Cieri, Maren Tabea Meinhard, Giorgia Rauco, Ali Harb, Benjamin William Allen, Pratyush Das, Miao Hu, Lei Li