Here's the solution to a question posed by The Morning Brew this morning.
Find the four numbers that satisfy the following:
- The sum of all the numbers is 31.
- One number is odd.
- The highest number minus the lowest number is 7.
- The difference between the middle two numbers is two.
- There are no duplicate numbers.
Pause here to think! Answer and explanation below...
Using the first clue we know that there are four numbers whose sum is 31. We can write this as:
z + y + x + w = 31
Where z, y, x, and w are the four integers we are looking for.
We'll assume for simplicity that these numbers are in descending order. Meaning that z is the largest number, and w is the smallest.
From the third clue, we know that the highest number (z) minus the lowest number (w) is equal to 7:
z - w = 7
Since an even number subtracted from or added to an odd number is always odd, we can deduce that either z or w is our single odd number (see the second clue).
From the fourth clue, we can see that the two middle numbers (y and x) are even. This is because an odd plus an even is odd, and an even plus an even is even. Since 2 is even, and we can only have one odd number, both y and x must both be even.
Finally, from clue five, we can have no duplicate numbers.
Lets take the equation from the third clue, and use it to simplify the equation from the first clue:
z + y + x + w = 31 and z - w = 7 Therefore, z = 7 + w Therefore, 7 + w + y + x + w = 31 // by composition 7 + y + x + 2w = 31 y + x + 2w = 24
Now let's find the minimum amount each of these numbers could be. We distribute them as evenly as possible:
y + x + 2w = 24 // from above Distributed as evenly as possible: a + a + 2a = 24 4a = 24 a = 24/4 a = 6
Now that we know the minimum, let's bring z back into the mix to find an upper bound on it:
z + 6 + 6 + 6 = 31 Lets make w our odd number: z + 6 + 6 + 5 = 31 And lets increase the value of y to meet clue 4: z + 8 + 6 + 5 = 31 Therefore, z + 19 = 31 z = 31 - 19 z = 12 Finally, 12 + 8 + 6 + 5 = 31
And that fills in all of our numbers! From the calculations above we can now say that the four numbers that meet the given clues and whose sum is 31 are:
12, 8, 6, and 5.