Monday, 1 August 2005

coin weighting problem: my solution

let's label the coins into letters: ABCDEFGHIJKL

  • on weight #1: ABCD vs EFGH
  • on weight #2: AEIJ vs CDFK
  • on weight #3: ACEI vs BHJL

this will yeilds only 24 results, which each one indicates which coin is counterfeit and whether the counterfeit is heavier or lighter. for each weight there are three possible outcome: left side lighter than right side, left side heavier than right side, and even. therefore, there should be 3 to the power 3 combinations. however, three of them will not happen (for ex. three even because every coin is weight at least once and one of them is counterfeit). the results are list as below:

Weight #1Weight #2Weight #3Result
L = RL = RL = R* cannot happen *
L = RL = RL < RL is heavier
L = RL = RL > RL is lighter
L = RL < RL = RK is heavier
L = RL < RL < RI is lighter
L = RL < RL > RJ is lighter
L = RL > RL = RK is lighter
L = RL > RL < RJ is heavier
L = RL > RL > RI is heavier
L < RL = RL = RG is heavier
L < RL = RL < RH is heavier
L < RL = RL > RB is lighter
L < RL < RL = RF is heavier
L < RL < RL < RA is lighter
L < RL < RL > R* cannot happen *
L < RL > RL = RD is lighter
L < RL > RL < RC is lighter
L < RL > RL > RE is heavier
L > RL = RL = RG is lighter
L > RL = RL < RB is heavier
L > RL = RL > RH is lighter
L > RL < RL = RD is heavier
L > RL < RL < RE is lighter
L > RL < RL > RC is heavier
L > RL > RL = RF is lighter
L > RL > RL < R* cannot happen *
L > RL > RL > RA is heavier

No comments: