A puzzle by David B., a mathematician at the National Security Agency, from the agency’s May 2017 Puzzle Periodical:

Steve, Tony, and Bruce have a plate of 1,000 cookies to share. They decide to share them in the following way: beginning with Steve, each of them in turn takes as many cookies as he likes (they must take an integer amount, greater than or equal to 1), and then passes the plate clockwise (with Tony sitting to Steve’s left, and Bruce sitting to Tony’s left). Nobody wants to feel like he hogged too many cookies, so they all want to avoid being the player at the end who has taken the most cookies. Additionally, nobody wants to feel cheated by finishing with the fewest cookies. Finally, given that the previous two conditions are definitely met, or definitely cannot be met, each player would like to maximize the number of cookies he eats. The players’ objectives can be summarized as follows:

Objectives:

- Have one player who has eaten more cookies than you, and one player who has eaten fewer cookies than you.
- Eat as many cookies as possible.

Objective #1 takes infinite priority over Objective #2. Assuming that all players are perfectly rational, that they are all aware of each other’s rationality and objectives, and that they cannot communicate with each other in any way, how many cookies should Steve take to ensure he meets both objectives and how many cookies will Tony and Bruce take if Steve takes the winning amount?