Hi,
I am trying to solve this problem but it is hard to find a possible approach. Could somebody help me?
Problem:
Let you have a rectangle cake. You want to divide it to N people. All of them must eat all piece of the cake and they have equally area. What is the minimum number of parallel cut you need to take.
Example:
Divide the cake for 5 people you need at least 3 cut: 2 horizontal cuts the cake into 3 parts: 2/5 and 2/5 and 1/5. Then with 1 vertical cut, the cake is divided into 6 parts: 4 piece2 1/5 and 2 pieces 1/10. Join 2 pieces 1/10, you have divided the cake equally for 5 people.
There is no limitation for N in this problem. However, I hope someone can show me an approach for 1 <= N <= 100000.