Skip to main content
added 2392 characters in body
Source Link
Kris Van Bael
  • 1.4k
  • 9
  • 13

As Pumbaa pointed out, many strategies struggle or fail with the case where the 2 false coins have the same averageopposite weight as the others-offsets that can cancel each other out.

You divide the 24 coins in 8 stacks of 3 coins. (make sure to mark the coins so that you always know what stack they came from). Then we compare the stacks in 4 pairs. (stack 1 versus stack 2, stack 3 versus stack 4, etc...). Out of these 4 measurements, 0, 1 or 2 can return an inequality (where the scale is not balanced). Let's handle these 3 cases:

Case A: Two of the stack-comparisons were unequal: That means that we can dismissconfirm the other 12 coins as genuine and look for one false coin from each unequal measurement. To find a false coin in such a stack-pair, we remove one coin from both stacks, and swap one coin to the other side. The resulting 2x2 coins are compared. This measurement will reveal that the false coin is either among the 2 removed coins, or among the 2 swapped coins or among the 2 other coins. One more measurement (with the help of a genuine coin) will reveal the false coin. If we do that for both stack-pairs, we get a full solution in 8 measurements.

Case B: One measurement is unequal: This means that both false coins must be among the 6 coins of that measurement. ThatFinding them takes 5 measurements: Comparing coin 1 and 2, then coin 2 and 3 etc... (I'll leave it to the reader to proof thiswork out the details. Consider that atHint: At least 1 measurement will return equal, and that every unequal measurements includesmust include at least one false coin). That's a total of 9 measurements

Case C: All measurements return equal, that is only possible in a few special cases where both false coins are part of the same measurement (but we don't know which one). For the next5th measurement, put stacks 1 and 3 on one side and stacks 5 and 7 on the other (so 6 coins on each side).

Case C1: If this 5th measurement returns equal, then theboth false coins must be in the same stack, canceling each other out with opposite weight offsets. Let's find them in 4 measurementsOur 6th measurement: From stacks 1 to 56 put one coin on each side of the scale (so 56 coins on each side):

Case C1a: If the scale returns equal, then the false coins must be either in stack 6, 7 or in stack 8. Put two coinsCompare a coin of stack 6 on one side and two coinseach. And again another coin of stack 7 on the othereach. If this returns equalBy now, thenthere's only 2 possible answers, comparing the false coins must be inright coin from stack 7 or 8. Next we compare 2 coins (A&B) of that stack with the third (C) and a genuine coin. If it measures equal, then A&B are false. If unequal, then C is false and one more measurement of A vs. a genuine coin will prove either A or B to be false. That's should eliminate the last doubt: 9 measurements in total.

Case C1b: If the scalemeasurement from C1 returns unequal, then the false coins are both in one of the stacks 1 to 56. If you move the same 1012 coins to one side of the scale and compare with 10 genuine coinsthe other 12 (you have 14 confirmed so farcertainly genuine) coins, then you can dismissidentify one coin of each of the 56 stacks as genuine. Now you just need to identify the right stack, which is relatively trivial in 2 measurements (especially since you know which coin one will be overweight and which one underweight):

First let's reduce from 6 stacks to 3 stacks: Compare the candidate overweight coins from stacks 1,2&3 with 3 genuine coins. For the final measurement, you put on one side the candidate overweight coin from one stack with the candidate underweight coin of another stack and compare with 2 genuine coins. Total: 9 measurements

As Pumbaa pointed out, many strategies struggle or fail with the case where the 2 false coins have the same average weight as the others.

You divide the 24 coins in 8 stacks of 3 coins. Then we compare the stacks in 4 pairs. (stack 1 versus stack 2, stack 3 versus stack 4, etc...). Out of these 4 measurements, 0, 1 or 2 can return an inequality. Let's handle these 3 cases:

Case A: Two of the stack-comparisons were unequal: That means that we can dismiss the other 12 coins as genuine and look for one false coin from each unequal measurement. To find a false coin in such a stack-pair, we remove one coin from both stacks, and swap one coin to the other side. The resulting 2x2 coins are compared. This measurement will reveal that the false coin is either among the 2 removed coins, or among the 2 swapped coins or among the 2 other coins. One more measurement (with the help of a genuine coin) will reveal the false coin. If we do that for both stack-pairs, we get a full solution in 8 measurements.

Case B: One measurement is unequal: This means that both false coins must be among the 6 coins of that measurement. That takes 5 measurements: Comparing coin 1 and 2, then coin 2 and 3 etc... (I'll leave it to the reader to proof this. Consider that at least 1 measurement will return equal, and that every unequal measurements includes at least one false coin). That's a total of 9 measurements

Case C: All measurements return equal, that is only possible in a few special cases where both false coins are part of the same measurement (but we don't know which one). For the next measurement, put stacks 1 and 3 on one side and stacks 5 and 7 on the other (so 6 coins on each side).

Case C1: If this 5th measurement returns equal, then the false coins must be in the same stack, canceling each other out with opposite weight offsets. Let's find them in 4 measurements: From stacks 1 to 5 put one coin on each side of the scale (so 5 coins on each side):

Case C1a: If the scale returns equal, then the false coins must be in stack 6, 7 or 8. Put two coins of stack 6 on one side and two coins of stack 7 on the other. If this returns equal, then the false coins must be in stack 8. Next we compare 2 coins (A&B) of that stack with the third (C) and a genuine coin. If it measures equal, then A&B are false. If unequal, then C is false and one more measurement of A vs. a genuine coin will prove either A or B to be false. That's 9 measurements in total.

Case C1b: If the scale returns unequal, then the false coins are both in one of the stacks 1 to 5. If you move the same 10 coins to one side of the scale and compare with 10 genuine coins (you have 14 confirmed so far), then you can dismiss one coin of each of the 5 stacks as genuine. Now you just need to identify the stack, which is relatively trivial in 2 measurements (especially since you know which one will be overweight and which one underweight). Total: 9 measurements

As Pumbaa pointed out, many strategies struggle or fail with the case where the 2 false coins have opposite weight-offsets that can cancel each other out.

You divide the 24 coins in 8 stacks of 3 coins. (make sure to mark the coins so that you always know what stack they came from). Then we compare the stacks in 4 pairs. (stack 1 versus stack 2, stack 3 versus stack 4, etc...). Out of these 4 measurements, 0, 1 or 2 can return an inequality (where the scale is not balanced). Let's handle these 3 cases:

Case A: Two of the stack-comparisons were unequal: That means that we can confirm the other 12 coins as genuine and look for one false coin from each unequal measurement. To find a false coin in such a stack-pair, we remove one coin from both stacks, and swap one coin to the other side. The resulting 2x2 coins are compared. This measurement will reveal that the false coin is either among the 2 removed coins, or among the 2 swapped coins or among the 2 other coins. One more measurement (with the help of a genuine coin) will reveal the false coin. If we do that for both stack-pairs, we get a full solution in 8 measurements.

Case B: One measurement is unequal: This means that both false coins must be among the 6 coins of that measurement. Finding them takes 5 measurements: Comparing coin 1 and 2, then coin 2 and 3 etc... (I'll leave it to the reader to work out the details. Hint: At least 1 measurement will return equal, and that every unequal measurements must include at least one false coin). That's a total of 9 measurements

Case C: All measurements return equal, that is only possible in a few special cases where both false coins are part of the same measurement (but we don't know which one). For the 5th measurement, put stacks 1 and 3 on one side and stacks 5 and 7 on the other (so 6 coins on each side).

Case C1: If this 5th measurement returns equal, then both false coins must be in the same stack, canceling each other out with opposite weight offsets. Our 6th measurement: From stacks 1 to 6 put one coin on each side of the scale (so 6 coins on each side):

Case C1a: If the scale returns equal, then the false coins must be either in stack 7 or in stack 8. Compare a coin of each. And again another coin of each. By now, there's only 2 possible answers, comparing the right coin from stack 7 or 8 with a genuine coin should eliminate the last doubt: 9 measurements.

Case C1b: If the measurement from C1 returns unequal, then the false coins are both in one of the stacks 1 to 6. If you move the same 12 coins to one side of the scale and compare with the other 12 (certainly genuine) coins, then you can identify one coin of each of the 6 stacks as genuine. Now you just need to identify the right stack, which is relatively trivial in 2 measurements (especially since you know which coin one will be overweight and which one underweight):

First let's reduce from 6 stacks to 3 stacks: Compare the candidate overweight coins from stacks 1,2&3 with 3 genuine coins. For the final measurement, you put on one side the candidate overweight coin from one stack with the candidate underweight coin of another stack and compare with 2 genuine coins. Total: 9 measurements

added 2392 characters in body
Source Link
Kris Van Bael
  • 1.4k
  • 9
  • 13

Here’s the bestEdited: I originally posted a strategy that I could find so farrequired 17 moves. No idea if it is optimal. It needs. but in the meantime, I found a significantly better one: There is a strategy that requires at most…most...

17 moves.9 measurements, all using the 2-pan-scale

Yup that’s a lot, but the equal-average case is a serious bummer. It would be nice if someone can find a better strategy.

My strategy works as followsHere's how it goes:

We numberYou divide the coins from 1 to 24, and use the 2-pan-scale to compare two subsequent coins, starting with in 8 stacks of 3 coins. Then we compare the stacks in 4 pairs. (stack 1 andversus stack 2, then 2 andstack 3 versus stack 4, etc. Let’s call this a “chain”. So.). Out of these 4 measurements, 0, 1 or 2 can return an ninequality. Let's handle these 3 cases:

Case A: Two of the stack-chain measures n subsequentcomparisons were unequal: That means that we can dismiss the other 12 coins as genuine and look for one false coin from each unequal measurement. To find a false coin in nsuch a stack-1 measurements. In this strategypair, we start a chain withremove one coin from both stacks, and swap one coin to the first 2other side. The resulting 2x2 coins and keep adding measurements untilare compared. This measurement will reveal that the chainfalse coin is decisiveeither among the 2 removed coins, that is: you can deriveor among the 2 swapped coins or among the 2 other coins. One more measurement (with everything you know so far) the identityhelp of all coins ina genuine coin) will reveal the chainfalse coin. Then you skip a measurementIf we do that for both stack-pairs, effectively startingwe get a new chainfull solution in 8 measurements. For example

Case B: One measurement is unequal: if 1&2 weight equalThis means that both false coins must be among the 6 coins of that measurement. That takes 5 measurements: Comparing coin 1 and so do 2&32, then all 3 are genuinecoin 2 and you can start new chain by weighing 4&53 etc. This strategy needs.. (I'll leave it to the reader to proof this. Consider that at most 17least 1 measurement will return equal, and that every unequal measurements includes at least one false coin). That's a total of 9 measurements

A bit more proof:

It is relatively easy to showCase C: All measurements return equal, that a 6-chain is always decisiveonly possible in a few special cases where both false coins are part of the same measurement (Example measurements of an indecisivebut we don't know which one). For the next measurement, put stacks 1 and 3 on one side and stacks 5-chain: equal-heavier-lighter-lighter and 7 on the other (so 6 coins on each side). Similarly

Case C1: If this 5th measurement returns equal, a 4-chainthen the false coins must be in the same stack, canceling each other out with opposite weight offsets. Let's find them in 4 measurements: From stacks 1 to 5 put one false coin is always decisive and if you already identifiedon each side of the scale (so 5 coins on each side):

Case C1a: If the scale returns equal, then the false coins must be in stack 6, 7 or 8. Put two coins of stack 6 on one side and two coins of stack 7 on the other. If this returns equal, then the false coins must be in stack 8. Next we compare 2 coins (A&B) of that stack with the third (C) and a genuine coin. If it measures equal, then 2-chainA&B are false. If unequal, then C is enough to identify 2 genuine coinsfalse and one more measurement of A vs. a 3 chaingenuine coin will spot the 2ndprove either A or B to be false coin. With thisThat's 9 measurements in mindtotal.

Case C1b: If the scale returns unequal, then the false coins are both in one of the stacks 1 to 5. If you move the same 10 coins to one side of the scale and compare with 10 genuine coins (you have 14 confirmed so far), then you can show that a worst case scenario hasdismiss one coin of each of the 5 stacks as genuine. Now you just need to identify the stack, which is relatively trivial in 2 measurements (especially since you know which one will be overweight and which one underweight). Total: 9 measurements

Case C2: If the 5th measurement return unequal, then the false coins at positions 21have the same weight and 23are in two stacks that were on opposite sides in one of the first 4 measurements. Suppose stacks 1+3 are heavier than 5+7 (or 21&22the other case is symmetrical) so. That means that we needeither stacks 1 and 2 have both a heaver coin, or stacks 3 and 4 have both a heavier coin, or stacks 5 and 6 both have a lighter coin, or stacks 7 and 8 both have a lighter coin. To identify which of the 4 scenarios we compare stacks 1 and 3-chains (all genuine6th measurement), and one 6-chainstacks 5 and 7 (7th measurement). That adds up to 6*2+5=17 measurementsNow we know which two stacks have a false coin and if it's heavier or lighter. By comparing two coins of such a stack, we can identify the false coin. Doing that for both stacks results in 9 measurements.

Here’s the best strategy that I could find so far. No idea if it is optimal. It needs at most…

17 moves.

Yup that’s a lot, but the equal-average case is a serious bummer. It would be nice if someone can find a better strategy.

My strategy works as follows:

We number the coins from 1 to 24, and use the 2-pan-scale to compare two subsequent coins, starting with coins 1 and 2, then 2 and 3, etc. Let’s call this a “chain”. So an n-chain measures n subsequent coins in n-1 measurements. In this strategy we start a chain with the first 2 coins and keep adding measurements until the chain is decisive, that is: you can derive (with everything you know so far) the identity of all coins in the chain. Then you skip a measurement, effectively starting a new chain. For example: if 1&2 weight equal and so do 2&3, then all 3 are genuine and you can start new chain by weighing 4&5. This strategy needs at most 17 measurements.

A bit more proof:

It is relatively easy to show that a 6-chain is always decisive (Example measurements of an indecisive 5-chain: equal-heavier-lighter-lighter). Similarly, a 4-chain with one false coin is always decisive and if you already identified one false coin then 2-chain is enough to identify 2 genuine coins and a 3 chain will spot the 2nd false coin. With this in mind, one can show that a worst case scenario has false coins at positions 21 and 23 (or 21&22) so that we need 6 3-chains (all genuine) and one 6-chain. That adds up to 6*2+5=17 measurements.

Edited: I originally posted a strategy that required 17 moves... but in the meantime, I found a significantly better one: There is a strategy that requires at most...

9 measurements, all using the 2-pan-scale

Here's how it goes:

You divide the 24 coins in 8 stacks of 3 coins. Then we compare the stacks in 4 pairs. (stack 1 versus stack 2, stack 3 versus stack 4, etc...). Out of these 4 measurements, 0, 1 or 2 can return an inequality. Let's handle these 3 cases:

Case A: Two of the stack-comparisons were unequal: That means that we can dismiss the other 12 coins as genuine and look for one false coin from each unequal measurement. To find a false coin in such a stack-pair, we remove one coin from both stacks, and swap one coin to the other side. The resulting 2x2 coins are compared. This measurement will reveal that the false coin is either among the 2 removed coins, or among the 2 swapped coins or among the 2 other coins. One more measurement (with the help of a genuine coin) will reveal the false coin. If we do that for both stack-pairs, we get a full solution in 8 measurements.

Case B: One measurement is unequal: This means that both false coins must be among the 6 coins of that measurement. That takes 5 measurements: Comparing coin 1 and 2, then coin 2 and 3 etc... (I'll leave it to the reader to proof this. Consider that at least 1 measurement will return equal, and that every unequal measurements includes at least one false coin). That's a total of 9 measurements

Case C: All measurements return equal, that is only possible in a few special cases where both false coins are part of the same measurement (but we don't know which one). For the next measurement, put stacks 1 and 3 on one side and stacks 5 and 7 on the other (so 6 coins on each side).

Case C1: If this 5th measurement returns equal, then the false coins must be in the same stack, canceling each other out with opposite weight offsets. Let's find them in 4 measurements: From stacks 1 to 5 put one coin on each side of the scale (so 5 coins on each side):

Case C1a: If the scale returns equal, then the false coins must be in stack 6, 7 or 8. Put two coins of stack 6 on one side and two coins of stack 7 on the other. If this returns equal, then the false coins must be in stack 8. Next we compare 2 coins (A&B) of that stack with the third (C) and a genuine coin. If it measures equal, then A&B are false. If unequal, then C is false and one more measurement of A vs. a genuine coin will prove either A or B to be false. That's 9 measurements in total.

Case C1b: If the scale returns unequal, then the false coins are both in one of the stacks 1 to 5. If you move the same 10 coins to one side of the scale and compare with 10 genuine coins (you have 14 confirmed so far), then you can dismiss one coin of each of the 5 stacks as genuine. Now you just need to identify the stack, which is relatively trivial in 2 measurements (especially since you know which one will be overweight and which one underweight). Total: 9 measurements

Case C2: If the 5th measurement return unequal, then the false coins have the same weight and are in two stacks that were on opposite sides in one of the first 4 measurements. Suppose stacks 1+3 are heavier than 5+7 (the other case is symmetrical). That means that either stacks 1 and 2 have both a heaver coin, or stacks 3 and 4 have both a heavier coin, or stacks 5 and 6 both have a lighter coin, or stacks 7 and 8 both have a lighter coin. To identify which of the 4 scenarios we compare stacks 1 and 3 (6th measurement), and stacks 5 and 7 (7th measurement). Now we know which two stacks have a false coin and if it's heavier or lighter. By comparing two coins of such a stack, we can identify the false coin. Doing that for both stacks results in 9 measurements.

added 39 characters in body
Source Link
Kris Van Bael
  • 1.4k
  • 9
  • 13

As Pumbaa pointed out, many strategies struggle or fail with the case where the 2 false coins have the same average weight as the others.

Here’s the best strategy that I could find so far. No idea if it is optimal. It needs at most…

17 moves.

Yup that’s a lot, but the equal-average case is a serious bummer. It would be nice if someone can find a better strategy.

My strategy works as follows:

We number the coins from 1 to 24, and use the 2-pan-scale to compare two subsequent coins, starting with coins 1 and 2, then 2 and 3, etc. Let’s call this a “chain”. So an n-chain measures n subsequent coins in n-1 measurements. In this strategy we start a chain with the first 2 coins and keep adding measurements until the chain is decisive, that is: you can derive (with everything you know so far) the identity of all coins in the chain. Then you skip a measurement, effectively starting a new chain. For example: if 1&2 weight equal and so do 2&3, then all 3 are genuine and you can start new chain by weighing 4&5. This strategy needs at most 17 measurements.

A bit more proof:

It is relatively easy to show that a 6-chain is always decisive (Example measurements of an indecisive 5-chain: equal-heavier-lighter-lighter). Similarly, a 4-chain with one false coin is always decisive and if you already identified one false coin then 2-chain is enough to identify 2 genuine coins and a 3 chain will spot the 2nd false coin. With this in mind, one can show that a worst case scenario has false coins at positions 21 and 23 (or 21&22) so that we need 6 3-chains (all genuine) and one 6-chain. That adds up to 6*2+5=17 measurements.

As Pumbaa pointed out, many strategies struggle or fail with the case where the 2 false coins have the same average weight as the others.

Here’s the best strategy that I could find so far. No idea if it is optimal. It needs at most…

17 moves.

Yup that’s a lot, but the equal-average case is a serious bummer. It would be nice if someone can find a better strategy.

My strategy works as follows:

We number the coins from 1 to 24, and use the 2-pan-scale to compare two subsequent coins, starting with coins 1 and 2, then 2 and 3, etc. Let’s call this a “chain”. So an n-chain measures n subsequent coins in n-1 measurements. In this strategy we start a chain with the first 2 coins and keep adding measurements until the chain is decisive, that is: you can derive (with everything you know so far) the identity of all coins in the chain. Then you skip a measurement, effectively starting a new chain. For example: if 1&2 weight equal and so do 2&3, then all 3 are genuine and you can start new chain by weighing 4&5. This strategy needs at most 17 measurements.

A bit more proof:

It is relatively easy to show that a 6-chain is always decisive (Example measurements of an indecisive 5-chain: equal-heavier-lighter-lighter). Similarly, a 4-chain with one false coin is always decisive and if you already identified one false coin then 2-chain is enough to identify 2 genuine coins and a 3 chain will spot the 2nd false coin. With this in mind, one can show that a worst case scenario has false coins at positions 21 and 23 (or 21&22) so that we need 6 3-chains (all genuine) and one 6-chain.

As Pumbaa pointed out, many strategies struggle or fail with the case where the 2 false coins have the same average weight as the others.

Here’s the best strategy that I could find so far. No idea if it is optimal. It needs at most…

17 moves.

Yup that’s a lot, but the equal-average case is a serious bummer. It would be nice if someone can find a better strategy.

My strategy works as follows:

We number the coins from 1 to 24, and use the 2-pan-scale to compare two subsequent coins, starting with coins 1 and 2, then 2 and 3, etc. Let’s call this a “chain”. So an n-chain measures n subsequent coins in n-1 measurements. In this strategy we start a chain with the first 2 coins and keep adding measurements until the chain is decisive, that is: you can derive (with everything you know so far) the identity of all coins in the chain. Then you skip a measurement, effectively starting a new chain. For example: if 1&2 weight equal and so do 2&3, then all 3 are genuine and you can start new chain by weighing 4&5. This strategy needs at most 17 measurements.

A bit more proof:

It is relatively easy to show that a 6-chain is always decisive (Example measurements of an indecisive 5-chain: equal-heavier-lighter-lighter). Similarly, a 4-chain with one false coin is always decisive and if you already identified one false coin then 2-chain is enough to identify 2 genuine coins and a 3 chain will spot the 2nd false coin. With this in mind, one can show that a worst case scenario has false coins at positions 21 and 23 (or 21&22) so that we need 6 3-chains (all genuine) and one 6-chain. That adds up to 6*2+5=17 measurements.

Source Link
Kris Van Bael
  • 1.4k
  • 9
  • 13
Loading