# NSA puzzle

I came upon a fun little puzzle yesterday that I traced back to one being hosted by the NSA on their puzzle website.
It’s one of those puzzles that, at first sight, seems to not have enough information to solve, but when you work through it, it all becomes clear, and results in smiles as you logically break down each step. Here’s the puzzle:

Three athletes (and only three athletes) participate in a series of track and field events. Points are awarded for 1st, 2nd, and 3rd place in each event (the same points for each event, i.e. 1st always gets “x” points, 2nd always gets “y” points, 3rd always gets “z” points), with x > y > z > 0, and all point values being integers.
The athletes are named: Adam, Bob, and Charlie.
• Adam finished first overall with 22 points.
• Bob won the Javelin event and finished with 9 points overall.
• Charlie also finished with 9 points overall.
Question: Who finished second in the 100-meter dash (and why)?

## First Thoughts

The puzzle does not specify the total number of events, and is oddly specific about the 100 meter dash, even though there is no other reference to this event in the question (I’m also pleased to comment that the NSA elected to use metric when posing the question!)
Since no reference is made to how to distribute points in the event of ties, I’m going to assume that for each event there were distinct places for each of the contestants.

## Working the problem

First, we can see that total number of points awarded in the competition is 22 + 9 + 9 = 40.
Because the question states that all points awarded are integers, using the factors of forty, we can speculate as to the number of events in the competition (and also eliminate many possibilities), and the corresponding total points that would be awarded in each event.
#EventsPointsNotes
140This is not a possible because we know there are at least two events (Javelin and 100m dash).
220This is also not possible because we know that Adam and Bob both need to have won one event, and thus there is no way that Bob and Charlie could finish with the same number of points.
410A potential combination.
58A potential combination.
85This is not possible. We know that x>y>z>0 so the very smallest set for the scores would be (3,2,1) = 6, which is a higher total than five per event.
104Same reason as above.
202Same reason as above.
401Same reason as above.
So we've already learned that the total number of events in the competition has to be either four or five.
Let's first examine the case if there are four events. This means that there must be ten points awarded per event. Because we know that x>y>z>0, there are only a limited number of combinations possible that add up to ten. Let's look at these now:
ScoringNotes (Four events total, ten points per event)
{5,3,2}Initially this looks good, but we can eliminate because, if there are four events, the maximum score possible would be 20 points, and we know Adam scored 22.
{5,4,1}Same reason as above.
{6,3,1}With some thinking we can see this is not possible. There is no way to combine four from the set to make 22. We know Bob won Javeling, so if Adam won the other three (3x6)=18, then there is no way to make 22 with a second or third place.
{7,2,1}A possibility that merits a deeper look.
Let's take a closer look at {7,2,1}. Adam can get to 22 points with three 1st wins, and one 3rd position placing (3×7)+1 = 22. So far so good. Now let's look at Bob. We know he got 1st in Javelin, for seven points, so that means he needs just two more points over three events. This is not possible. We've eliminated all possible scenarios if there were four events. Therefore, there must be exactly five events in the competition.

## Five Events

We've proved there must be five events, and therefore each event must have eight points to distribute. Because of the x>y>z>0 restriction, there are only two possible sets of scores:
ScoringNotes (Five events total, eight points per event)
{4,3,1}Impossible get 22 points from five events. Even if you won them all, it's a max of 20.
{5,2,1}By elimination, this has to be the solution, but let's confirm …

## Confirmation

First let's confirm that the scoring makes this solution numerically possible:
• Adam can finish in 1st place four times, and 2nd place once (4×5)+2=22. ✓ Check Because we know that Bob finished 1st in Javelin, it is the only event that Adam cannot win, so we also know that Adam must have come 2nd in Javelin.
• Bob finished 1st in Javelin (5 points) and, if he finished 3rd in the other four events, this is a total of nine (1×5)+(4×5)=9. ✓ Check
• We know that Charlie must have come 3rd in Javelin (1 point), because we know the positions of Adam and Bob in this event. It's possible for Charlie to get nine points by scoring two points (2nd) in the other four events (1×1)+(4×2)=9. ✓ Check
And this also gives us the answer to the cryptic question as to who finished second in the 100m dash. We know it's Charlie because he finished second in every event that is not the Javelin. We know this even though the type of the events is a mystery. Because the 100m dash is one of these events, we know Charlie has to have placed second. Explicity: