Laird wrote:I'm outta patience and ideas. Go right ahead.
OK, I will explain the principle first, and give you a chance to work out the actual solution.
See, after the first weighing, all the balls are partitioned into two sets -- the balls which are ballast, and the ones which could contain the culprit.
You can put ballast balls on the scales without disturbing the measurement.
So what you do it, you compute the branched solution for each branch separately, and
merge the branches, letting the balls from the other side play the role of ballast; i.e. you place both the balls from the set ABCDEFGH on the scale (as if scale unbalanced on the first weighing) and balls from the set IJKL on the scale (as if the scale balanced) -- and at the end, if the scale had indeed balanced, you can simply ignore the first 8 balls except inasmuch as they provide ballast.
This is why i said that it can all be reduced to a 4-ball case -- because you can pursue multiple branches simultaneously, so solving the 12-ball problem is really like solving simultaneously the 4-ball problem and the 4-pseudo-ball problem (because if the scales unbalance, you will end up having 4 balls possibly light and 4 balls possibly heavy, which is actually simpler than 4 balls either light or heavy). And solving 36-ball problem is like solving simultaneously the 12-ball problem and 12-pseudo-ball problem.
You just have to make sure that the one ball you leave off to solve the 4-ball problem is mirrored by the one ball you leave off to solve the 4 pseudo-ball problems. In case you are wondering, yes, I have in front of me a 2-step branchless solution for 4 pseudoballs, i.e. 8 probabilistic half-balls abcdEFGH, which involves an odd number of ballast balls in each step.
At the end of the three weighings, you will end with a sequence of three trits forming a number between 1 and 27, which will uniquely identify the culprit (though there might be a couple of numbers identifying the same culprit, because we are dealing with real balls and not IT pseudo-balls); e.g. something like the result '\-/' (left side went down, it balanced, left side went up -- that's how you meant the notation, right?) will point to the solution
d (ball D is light). Each of the 27 possible sequence of weighing outcomes will, collectively, identify one culprit ball and its weight.