Home Puzzles logical deduction – 12 Coins 3 weighings generalization

logical deduction – 12 Coins 3 weighings generalization

0
logical deduction – 12 Coins 3 weighings generalization

[ad_1]

First, quantity the cash utilizing Balanced Ternary. This is a ternary numeral system utilizing the digits -, 0, and + to symbolize -1, 0, and 1.

For the sake of brevity I’m going as an example this utilizing 12 cash, however this may be simply prolonged to bigger numbers. Just add extra trits to every quantity. (For instance, 120 cash would require 5 trits, corresponding to five weighings.)

  • 1 = 00+
  • 2 = 0+-
  • 3 = 0+0
  • 11 = ++-
  • 12 = ++0

Each of those will also be inverted by swapping every image.

  • -1 = 00-
  • -2 = 0-+
  • -3 = 0-0

This numbering now tells us the place to position the cash.

For the primary weighing, put all of the cash with a + of their first trit on the suitable pan, and all of the cash with a – of their first trit within the left pan. Leave all of the cash with a 0 of their first trit off. Then document the end result: if it tricks to the left, that is a -. If it tricks to the suitable, that is a +. If it’s balanced, that is a 0.

Repeat as many instances as essential, then have a look at the quantity you have recorded. With 12 cash there can be three weighings, so the end result could be e.g. +-+ (tipped to the suitable, tipped to the left, tipped to the suitable). This is the variety of the false coin. If it is constructive, that coin is heavier. If it is damaging, that coin is lighter. If the quantity is zero, no coin was pretend.

HOWEVER, this does not truly work exactly as I’ve written it. No constructive quantity has a – in its first trit, so the primary weighing may have one pan empty. Unless you’ve got a inventory of actual cash to check in opposition to (a variant of the issue), it will not be a helpful measurement.

So we have to invert a number of the cash’ numbers (so coin 5 may turn into coin -5), then interpret the end result in another way if one in every of these is chosen: a damaging quantity will now imply that the pretend coin is heavier, and a constructive quantity that it’s lighter.

This is the place I acquired caught in my very own experimentation, however some internet analysis signifies that John Conway got here up with a really intelligent manner to find out which of them to flip: undergo the cash, and have a look at the primary “change” within the sequence. If it’s – to 0, or 0 to +, or + to -, preserve it constructive. Otherwise, invert that quantity.

This is not as elegant as I would loveā€”it seems like there ought to be some solution to resolve mathematically which numbers to invert. But for now, that resolution is the very best I’ve.

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here