Discussion about the puzzle behind the previous post led to this question: Is it possible to construct a similar question, where there are three of five values and a mean given, and where the median is half one of the missing values, with has exactly two solutions?

That is, given the values {a, b, c, x, y} with a mean of d and a median of x/2, can the problem have exactly two solutions? Let a < b < c, for the sake of discussion.

First I assumed that x > x/2. In that case, it’s possible to prove that there is a unique solution. If x > x/2, then x cannot be the median. If y > c, then c is the median. If b < y < c, then y is the median. If y < b, then b is the median.

Since x is twice the median, we could only have two solutions if the median changes. Let’s take the first two cases. In the first case, c is the median, and x = 2c. In this solution, y > c. In the second case, y < c and x = 2y. Because x + y = 5d, that means that when y decreases, x increases. But the difference between these two solutions (y > c and y < c) involve y decreasing. x would decrease by virtue of x = 2y, but it would increase by virtue of x = 5d – y. So there cannot be two solutions, one where the median is c and one where the median is y.

We can use similar reasoning to rule out the other two combinations of medians (c and b, and y and b). There cannot be two solutions where x is positive in both solutions. By similar reasoning, there cannot be two solutions where x is negative in both solutions.

That leaves two possible cases: x is zero in one solution, or x has different signs in the two solutions.

If x = 0, then x/2 = 0 and x is hence the median. To construct problems of this sort, we could have three scenarios:

- y is greater than c; the values are in the order (a, b, x, c, y). When x increases, it passes c, which becomes the median. For instance, set c = 1 and y > 4, so that when x = 2, y > 2. a and b can be set to any non-positive values.
- y is positive but less than c; the values are in the order (a, b, x, y, c). When x increases, it passes y. For instance, set y = 3 and c = 4, so that when x = 2, y = 1. a and b can be set to any non-positive values.
- y is not positive; the values are in the order (a, y, x, b, c) or (y, a, x, b, c). When x increases, it passes b, which becomes the median. y and a can be set to any non-positive values, and b and c can be set to any positive values.

It is also possible to construct puzzles such that x is negative in one solution and positive in another. There are two scenarios:

- Start with x = 2b and end with x = 2c. For instance, let’s say that b = -1, c = 1, and y > c + 4. In this case, x = -2 makes b the median; x = 2 makes c the median, since y > c.
- Start with x = 2b and end with x = 2y. In this case, say b = -1, y = 5, and c > 2. In this case, x = -2 makes b the median; x = 2 makes y = 1, and hence the median.

Note that this means that it’s possible to create a puzzle with exactly three solutions: x < 0 (x = 2b), x = 0, and x > 0 (x = 2c or x = 2y). An example: Given the known values (-10, -1, 1) and a mean of -1, what are x and y? These are the solutions:

- (-10, -2, -1, 1, 7)
- (-10, -1, 0, 1, 5)
- (-10, -1, 1, 2, 3)

Indeed, most cases with two solutions will have three solutions. One way (perhaps the only way) to create a puzzle with exactly two solutions is to make sure that y equals a fixed value when x = 2y. For instance, (-1, 2, 7) and a mean of 1 has only two solutions:

- (-3, -1, 0, 2, 7) (x = 0, y = -3)
- (-2, -1, -1, 2, 7) (x = -2, y = -1)

There is no third solution because x jumps over two values at once.