A logic test from a job selection process:
Cut slices of a pizza with exactly 8 straight cuts. How many (at most) slices can you get?
Solution
- With 0 cuts I get 1 slice, i.e. the whole pizza.
-
With 1 cut I get 2 slices, wherever I cut the pizza through.
-
With 2 cuts I get 4 slices, if the second cut crosses the first one at any point (inside the pizza).
-
With 3 cuts I can make a straight cut that crosses all of the previous cuts at different points (inside the pizza).
- Each cut defines two slices (one on each side)
-
but N cuts define N + 1 slices
because N – 1 slices are shared between each cut and the next, thus 2N – (N – 1) == N + 1.
-
I’m crossing all the N = 2 cuts from the previous step, which define N + 1 == 3 slices of the X = 4 slices.
Thus I now get X – (N + 1) + 2 * (N + 1) slices == X + N + 1 == 4 + 3 == 7 slices.
-
With 4 cuts, I get 7 + 4 == 11 slices.
-
With 5 cuts, I get 11 + 5 == 16 slices.
-
With 6 cuts, I get 16 + 6 == 22 slices.
-
With 7 cuts, I get 22 + 7 == 29 slices.
-
With 8 cuts, I get 29 + 8 == 37 slices.