This week's book giveaway is in the JavaFX forum. We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line! See this thread for details.

I think question is open ended and allows to speculate.

There are six coins with 2 lighter coins. Considering 2gm as genuine and 1gm as counterfeit. 2,2,2,2,1,1

Divide them into two groups and weigh them. Two possibilities
1) They weigh unequal i.e. one group is heavier than other.
2) They weigh equal. A) 2,2,1 B) 2,2,1

First let's consider case 1 and groups were A1) 2,2,2 and B1) 2,1,1.

Now pick one coin from group A1 and mix with group B1 and again divide them in two groups.

Same possibility again,

1) They weigh unequal 2) They weigh equal

Consider they weigh unequal, A2) 2,2 B2) 1,1

The lighter group contains those two lighter coins.

Now, if you consider the second case i.e they weigh equal. A21) 1,2 B21) 1,2

Now, swipe two coins. There are two possibilities here You swipe 1)equally weighing 1 with 1 or 2 with 2 2) Unequally weighing 1 with 2 or 2 with 1

1) If you swipe unequally weighing coins and then weigh again you would find the lighter side as those two lighter coins. This is in 3 weighs only, but
2) If you swipe equally weighing coins then , you need to remember those two coins and separate them out and weigh with another two coins , and the lighter side is two lighter coins. This take 4 weighing.

if you weigh 3 against three, and one side is lighter, you only need two weighings.

Both of the fake coins are in the lighter side.

If one fake coin is one side and another fake coin is another side during my first weighing
like (2 original coins + 1 fake coin one side and 2 original coins + 1 fake coin another side).
Then can we start from begining ?

kri shan wrote:If one fake coin is one side and another fake coin is another side during my first weighing
like (2 original coins + 1 fake coin one side and 2 original coins + 1 fake coin another side).
Then can we start from begining ?

No need. Because the first weighing balances, you now know that there exactly one counterfeit on each side. There is a way to find both of these, using just two weighings.

Arjun Shastry
Ranch Hand

Joined: Mar 13, 2003
Posts: 1889

posted

0

Thanks all.My approach was- coins A,B,C,D,E,F(Lighter coins need not be of same weight).
First compare A---B--If they weigh same, then C and D. If they too weigh same, then compare A and C.If A and C are same, then E and F are lighetr coins.
if A and B don't weigh same, then its simple.

Henrique: I think you're imagining a "weighing" differently than we are. That's probably because most of us have read similar problems to this, and we are assuming a detail which was not actually specified: the weighings are performed with a balance, in which you put as many things as you want on one side, and as many as you want on the other, and then you find out which side is heavier. (Or perhaps they balance, being equally heavy.) That's one weighing.

Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127

posted

0

Oh, thát kind of balance. Yes, makes sense, sorry about that.

Here's a twist on this puzzle: Can you come up with three predetermined weighings that will lead to the answer? i.e. You don't get to use the results of one weighing to determine which coins to weigh next.

I don't know if there is a solution, but how hard can it be?

Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127

posted

0

I still have doubts about the last solution to the previous problem.

Are they assuming that if A<B then A is one of the lighter coins and B is not? If so, they said that the lighter coins don't necessarily need to have the same weight, so how do you know that they're not both the lighter coins.
<br />
<br /> Also, are they assuming that if then they must be both original coins? If so, how do they know that they're not both lighter coins that coincidentally weigh the same weight?>

Ryan McGuire
Ranch Hand

Joined: Feb 18, 2005
Posts: 1041

4

posted

0

Henrique Ordine wrote:I still have doubts about the last solution to the previous problem.

Are they assuming that if A<B then A is one of the lighter coins and B is not? If so, they said that the lighter coins don't necessarily need to have the same weight, so how do you know that they're not both the lighter coins.
<br />
<br /> Also, are they assuming that if then they must be both original coins? If so, how do they know that they're not both lighter coins that coincidentally weigh the same weight?>

Yes, I do believe that even though it wasn't in the original problem statement we are assuming that both counterfeit coins are light by the same amount. Therefore, is A<B then A must be counterfeit and B must be real.
<br />
<br /> >

Mike Simmons
Ranch Hand

Joined: Mar 05, 2008
Posts: 3028

10

posted

0

No, Arjun's solution does not require the assumption that both counterfeits have the same weight.

If A < B, A is definitely counterfeit, and B is unknown.

From Stefan's description:

1: A-B
2: C-D

If we have identified two coins as lighter, we are done (e.g. A < B and C < D).

Meaning if both weighings are unbalanced, we have definitely identified two lighter coins, and those are the two counterfeits.

If we have identified one coin as lighter
3: E-F to find the 'other" lighter coin.

What was unstated here is that if E-F balance, that means that the second counterfeit must be in the first four. If only one of those two weighings was unbalanced, then the second counterfeit must be the heavier coin there. It was the coin we weren't sure about at first - now we know it must be counterfeit.

Otherwise (all scales balanced to date):
3: A-C

If balanced, then the two 'lighter' coins are E,F
If A<C, then the coins are A,B
otherwise the coins are C,D

I analysed all possible ways and came up withe following logic

For every time we weigh we have 3 possible outcomes either equals, greater than or less than

consider the four coins as a,b,c,d,e,f
make three groups of two each say ab,cd,ef

Now there are two possibilities both the defective are in same group or the defectives are in different groups.

i gave all symbols in small letters ,, sorry for that.......

as there are 2 fake coins in 6 coins these can have (6*5)/2=15 outcomes {Permutations and combinations}
I tried to get all the combination of 15 outcomes with the above analyses........