This is a puzzle a friend of mine showed me after hearing it in a job interview. I've since heard it several times, so it seems to be a classic - especially since the solution is so pretty!
Three people show up to a birthday party that features a rectangular cake. One gets impatient and cuts a rectangular piece out of the cake.
You now have to split the rest of the cake evenly between the remaining two people. How can you do this using a single straight cut?
Your solution should be a clear method for how to make the cut, for any size and relative orientation of the cake and the missing piece (see above for some examples). The resulting two pieces of cake should have equal area.
Hint:
Pbafvqre n fvatyr erpgnatyr. Gel phggvat vg va unys frireny qvssrerag jnlf.
Solution:
Jr unir gb phg guebhtu gur pragre bs gur pnxr naq gur pragre bs gur zvffvat cvrpr.
Nal yvar tbvat guebhtu gur pragre bs n erpgnatyr jvyy phg vgf nern va unys. Gur nobir phg jvyy fcyvg obgu gur nern bs gur pnxr, naq gur nern bs gur zvffvat cvrpr va gjb. Guhf gurve qvssrerapr jvyy nyfb or phg va gjb.
