|
Re: FAST reply.......A thinking ???
| quote: | Originally posted by Dj Fred Lamar
Hello TAs.......kinda need ur help on a problem that has to be turned in Sept. 4th at 10 am. just remembered I had this assigment to do about 30 min. ago. Here is the problem:
U R given 8 coins that R alike, but 1 is counterfiet & weighs slighty more than the others. Using only a balance (a scale that can only compare 1 side to the other), write a precise algorithm (or answer) that will identify the counterfeit coin in:
(a). exactly 3 weighings
(b). exaclty 2 weighings
I have already figured letter A out.....in need of B |
Ok, to make it simple...
Regular Coin = X
Counterfeit = C
Left side of Scale Right Side of Scale
A) 1. XXXX | XXXC
Thus, the coin is on the right side
Therefore, take the coins on the left away, and separate the coins on the right to the 2 sides:
2. XX | XC
The right side is again heavier, therefore the coin is on the right side. Separate the coins on the right side.
3. X | C
Right side is heavier, therefore it's the counterfeit
B) This is where it gets tricky, but the only real trick, as Davinox pointed out, is to NOT weigh all the coins in the beginning.
Left Side | Right Side
1. XXX | XXX
If this is the case, the 2 sides are even, and therefore, the coin is one of the two that was NOT weighed.
This leaves:
2. X | C
Therefore, coin is the one on the right side.
B) Part 2:
However, if the coin happens to be in the original group of 6 that you choose:
1. XXX | XXC
The scale will be off-balance. In this case, the coin is on the right side. Remove the coins on the left and take any 2 coins from the right.
2a. X | X
The scale is even, the coin is the one that WAS on the right side and is not on the scale right now.
2b. X | C
The scale is off-balance, The counterfeit coin is the one on the side which is heavier, here it's on the left.
Any questions?

|