Sharing a pepperoni pizza with your worst enemy

7k Views Asked by At

You are about to eat a pepperoni pizza, which is sliced into eight pieces. Each pepperoni will unambiguously belong to some slice (no pepperoni is "between" slices).

The caveat is that you have to share the pizza with your worst enemy, and you want to secure more pieces of pepperoni than he does. Slices are chosen as follows: First you choose any slice. Then your enemy chooses a slice adjacent to the slice that you just chose. Next, you choose a slice adjacent to one of the two chosen slices, and so on.

How do you make sure you get at least as much pepperoni as your opponent? In this case, a solution is as follows: Number the slices $1, 2, 1, 2, 1, 2, 1, 2$, such that any two consecutive slices have different labels. Add the number of pepperonis on all slices with the label $1$, and add the number of pepperonis on all slices with the label $2$. If e.g. the number of pepperonis on the slices numbered $1$ is largest, you choose some slice with the number $1$. Your enemy can then only choose a slice with the number $2$, to which you respond by choosing the next adjacent slice with the number $1$, and so forth.

This works, whenever there is an even number of slices.

My question is, is there a winning strategy, when the number of slices is odd?

3

There are 3 best solutions below

2
On BEST ANSWER

Believe it or not, this problem has been studied before (in the superficially different formulation of a pizza sliced into radial slices of unequal size). It turns out that the first player can only guarantee getting $4/9$ of the pizza: there are slicings of the pizza under which the second player can get $5/9$ of the pizza. See, for example, this arxiv preprint. If you have access to MathSciNet, this review of the same paper might also be a decent index into the history of the problem.

0
On

This problem reminds me of the first problem, "Coins in a Row", in Peter Winkler's Mathematical Puzzles: A Connoisseur's Collection.

There are quite a number of discussions of this problem online, for example here's a blog post that looks to maximize a linear version of this problem.

Curiously, with the linear version of the problem (where players can either pick the first or last "slice" in the line), an even number of "slices" guarantees that the first player can have more "pepperoni", but an odd number of "slices" often gives the second player an advantage.

2
On

With an odd number of slices, whomever goes first reduces the following player's problem to the even-numbered solution, that is to say, they can alternately colour the pizza slices black and white, sum the values, and chose the set with the most value.

Therefore the problem is reduced to this: which slice can you take that gives you enough value to overcome the difference between the two remaining sets? If there exists such a slice, you want to play first and take that slice and your victory is guaranteed. If not, then no matter what the first player does, they will lose to a sufficiently savvy opponent.