Problem 2126. Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
- http://en.wikipedia.org/wiki/Egyptian_fraction
- AMS blog post by Tyler Clark (@tylermath12) http://blogs.ams.org/jmm2014/2014/01/17/friday-morning-math-fun/
- Bonus points if you can enumerate all possible Egyptian fractions of (p,q), but thats a problem for another day.
Solution Stats
Problem Comments
-
4 Comments
This problem is quite well constructed and described. However, per the WP article linked to, it is important to specify two additional requirements: 〔1〕 Denominators must be positive. This is not explicitly mentioned in the Problem Statement [although perhaps it's implied], and moreover it's not checked in the Test Suite. That means 3/4 = 1/(1) + 1/(-4) would be erroneously accepted. 〔2〕 Each of the denominators must be different/unique. That is enforced in the Test Suite, but there's no mention of it in the Problem Statement. —DIV
Can't submit a solution to this problem (temporary unavailability of MATLAB Service).
The test suite has been updated to include more robust checks on solutions and solutions have been rescored.
Solution Comments
Show commentsGroup

Algorithm I
- 17 Problems
- 5 Finishers
- Calculate the Levenshtein distance between two strings
- Calculate the Damerau-Levenshtein distance between two strings.
- Coin distribution
- Coin Distribution - 02
- Split bread like the Pharaohs - Egyptian fractions and greedy algorithm
- The Tortoise and the Hare - 01
- The Tortoise and the Hare - 02
- Quarantine Days
- Word Ladder
- Kolakoski Sequence
- Is this group simply connected?
- Sub-sequence - 01
- Sub-sequence - 02
- Sub-sequence - 03
- longest common substring : Skipped character version
- Find an optimal placement of coolers on a grid
- Chain multiplication - 02
Problem Recent Solvers80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!