Comment #2 on issue 4122 by [email protected]: Egyptian fractions
http://code.google.com/p/sympy/issues/detail?id=4122

No.  The greedy algorithm takes the largest unit fraction less than or
equal to the target fraction at each iteration (see
https://en.wikipedia.org/wiki/Greedy_algorithm_for_Egyptian_fractions).
 The Graham-Jewett algorithm appears to be something quite different.  To
use the example of *4/5* provided in the main article, we would obtain
*egypt.graham_jewett(4,5) --> [5, 6, 7, 8, 30, 31, 32, 42, 43, 56, 930,
931, 992, 1806, 865830]*
whereas
*egypt.greedy(4,5) --> [2, 4, 20]*.

I have some old code kicking around to generate Egyptian fractions in
regular Python (2.7).  I've annotated it and attached it to this email.
 I'll see if I can improve and expand it and send the results along if that
would help you any.

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to