At the weekend, I went to a lovely party, and on finding out I was a mathematician, one of the other attendees shared a weight puzzle that I think I have come across before but never tried to solve. I have been thinking about it on and off since then, and I promised to the other party-goers that I’d share my solution once I got there, so here we go!
First of all then, the problem. You have 12 objects which look identical. 11 are the same weight; one is different, but we don’t know if it’s heavier or lighter. You have a set of balancing scales, and you can do up to three weighings. How do you determine the odd weight out and determine whether it’s heavier or lighter?
You might want to have a think about the problem for yourself before reading on.
To start with, I thought about similar, simpler problems I’ve solved before. The difference about this variant was that we didn’t know whether the odd weight out was heavier or lighter, and after playing in my mind with a few possibilities this was the point where I kept getting stuck. In my mind, I was picturing a balance with some balls on one side and some on the other, tipped up, and having no idea whether it was because one on the left was too heavy, or one on the right was too light!
In my last post I talked about playful maths, and one of my strategies for the weights problem was to get a feel for it by playing around. Could I solve the problem if I knew one weight was heavier? Could I solve it if I had fewer weights? This phase of the problem solving was about building up instincts and understanding about different situations. We had been chatting a bit about the problem and different people at the party had suggested various starting strategies (6 against 6? 4 against 4? 3 against 3? What happens if I start with each of these, where do I get stuck?) Eventually I realised I needed some thinking time on my own (and other people were less invested in solving the problem than I was, so conversation moved on), so I went up to the loo and used it as an excuse to think on my own for a bit. I made a bit of progress, worked a few things out that weren’t going to work, got frustrated because it felt like the answer was close, and then parked the problem, rejoined the party, and talked about Greek Tragedy, Educational Policy in the late 20th and early 21st Century, and the benefits of halloumi as a protein source.
That night as I was trying to fall asleep, I thought about the problem some more. Without pencil and paper, I started thinking about how I would record ideas if I did have something to write on. I began to come up with possible notation, and fell asleep thinking of how the right notation would help me to play with different possibilities.
The following day, I was travelling so didn’t really have time and headspace to think about the problem, but I did think a bit about how I would write a simulator which randomly created a heavier-or-lighter object and allowed you to trial different weighings, in order to work out a strategy. I planned to try writing it the following day, but as it happened, I did some more thinking about the problem as I was trying to fall asleep that night, and managed to solve it! So instead of writing a weights puzzle game, I am writing up my solution instead.
So, notation. I will call the objects 1,2,3…,11,12. I will append in {} after each one L/N/H to say if it is possible for it to be lighter, normal weight, or heavier as a result of each weighing.
Stage One: weigh 1,2,3,4 against 5,6,7,8.
Two cases; they balance, or one side goes down.
Case one: they balance.
We have 1,2,3,4,5,6,7,8{N}, 9,10,11,12{L/N/H}.
Second weighing: 1,2,3{N} against 9,10,11{L/N/H}.
Three possiblilities: a) they balance b) 1,2,3 goes down c) 1,2,3 goes up.
a) We now know 12 is the odd weight out. We use our third weighing against any of the others to determine if it’s lighter or heavier.
b) As 1,2,3 are normal weight, we know 9, 10 or 11 are lighter. We use our third weighing to test 9 against 10, if they balance 11 is the lighter weight and if they don’t, whichever is lighter out of 9 and 10 is the lighter weight.
c) as b) above, except 9,10 or 11 is heavier.
Case two: one side goes down.
Let’s assume it’s 1,2,3,4 (the argument follows in a similar way if it’s 5,6,7,8).
This means we have 1,2,3,4{N/H} 5,6,7,8{L/N} with 9,10,11,12{N}.
For the second weighing, we are going to weigh 1,2 and 5 against 3,4 and 6.
Three possibilities: a) they balance b) 1,2,5 goes down c) 1,2,5 goes up.
a) We now know that either 7 or 8 is the odd weight out, and it’s lighter, so we can weigh 7 against 8 to determine.
b) We now know that either 1 or 2 is heavier, or 6 is lighter. We weigh 1 against 2; if one of them goes down we know it’s heavier, and if they balance we know 6 is lighter.
c) We now know that either 5 is lighter, or 3 or 4 is heavier. We weigh 3 against 4; if one of them goes down we know it’s heavier, and if they balance we know 5 is lighter.
So there we have it; three weighings is enough to determine which is the odd weight out! I am tempted to still make the simulator when I have time so that I can play some more and start determining a general strategy for finding the odd weight in n…
Ha, that works! I followed a similar approach, but a slightly different second weighing: I put 1,2,5,6 on one side, and 3,7,9,10 on the other. If they balance then either 4 is heavy or 8 is light, so we weigh one of those against a normal one. If 1,2,5,6 goes down, then either 1 or 2 is heavy, or 7 is light, so we do the same as with your third weighing, and if it goes up, we know 5 or 6 is light, or 3 is heavy. But yours is slightly simpler.