You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front of you that can be cut a large number of times. Given the number of kids at the party, find the minimum number of cuts you need to make to give all of them at least one piece. There can be pieces left over, but you need to make sure that everyone gets at least one piece. Fortunately, the pieces of cake don't have to be the same size.
Good luck!
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers43
Suggested Problems
-
Remove all the words that end with "ain"
2736 Solvers
-
1378 Solvers
-
Get the length of a given vector
13844 Solvers
-
We love vectorized solutions. Problem 1 : remove the row average.
897 Solvers
-
6379 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
for those detail-oriented (i.e. picky) I imagine cuts need to be straight lines, and the cake is two-dimensional?
You're half right: the cuts have to be straight. The cake is 3-D, though. Assume the cake is a rectangular solid, and all cuts are planar.
thanks for the clarification!
death^H^H^H^Hservings by a thousand cuts
I would definitely NOT want to host a birthday party with 1234567890 screaming children! Nor would I want to make 1950 cuts in one single cake!