A block of cheese in the shape of a
rectangular cuboid measures 10 cm x 13 cm x 14 cm. Ten slices are cut from the cheese. Each slice has a width of 1 cm and is cut parallel to one face of the cheese.
Determine the maximum possible volume in cubic cm of the remaining block of cheese after ten slices have been cut off.
One way of finding the answer is to apply an un-greedy algorithm - that is for each cut in sequence to slice off the smallest piece of cheese. This effectively means making all slices perpendicular to the longest edge. Then 10x13x14 -> 10x13x13 -> 10x12x13 -> etc until an answer of 9x9x9 remains, for a volume of 729.
Another way is to realize the edges have a total length of 37cm and ten slices will reduce that total by 10cm regardless of the cutting order (with one degenerate case resulting in a 0x13x14 block). Then we are to maximize a cuboid whose edges sum to 27. The answer is trivial as each edge would be 1/3 the total - a 9x9x9 cube.