return to tranceaddict TranceAddict Forums Archive > Main Forums > Chill Out Room

 
FAST reply.......A thinking ???
View this Thread in Original format
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
davinox
Weigh 3 coins with 3 coins.
- If one set of coins is heavier than the other, use that set and toss the other ones.
- If they are equally balanced, then toss the two that you balanced, and keep the one you didn't balance.

Now with your last three coins, weigh 1 coin with 1 coin.
- If one coin weighs more than the other, that coin is the fake.
- If the coins are equal, then the coin you didn't weigh is the fake.
Dj Fred Lamar
With that u run into a problem:

quote:
If one set of coins is heavier than the other, use that set and toss the other ones.


U would have 3 coins w/ 2 left over which makes 5.....how would u balane those......u would only have 1 more weigh to get it right..

quote:
If they are equally balanced, then toss the two that you balanced, and keep the one you didn't balance.


Then it would work perfect b/c u could way the last two but suppose they weren't......then that would take u to the above problem.
Dj Fred Lamar
But then again.......may be lookin at it wrong.....let me think it through
Dj Fred Lamar
Alright.....I think I see where u are coming from......:D

Great.............thanks for the fast reply........:D
phyrest0rm
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?
:cool: :cool:
k.k.d.
heh... I wish my assignments were as easy :(
that would make my life more pleassnt ;)
DJ Lac
GAWD DAMN PROBABILITY LOL I forgot how it goes with that tree branch lol
Dj Fred Lamar
quote:
Originally posted by k.k.d.
heh... I wish my assignments were as easy :(
that would make my life more pleassnt ;)


Hehehe.....its just the beginning course and my teacher doesn't no what to teach so he gives us all these brain questions?


Thanks 4 going into detail phyrest0rm.......

alright.....work down......lets see what the teacher thinks....:D
DJ Lac
Did you do his hw for him or what lol... best way to get hw fast is post on the board ;p. There is always more then enough geniuses

Dj Fred Lamar
quote:
Originally posted by DJ Lac
Did you do his hw for him or what lol... best way to get hw fast is post on the board ;p. There is always more then enough geniuses


Haha.......they were just aiding me through it......:D
sothis
thats a typical microsoft logic problem they'd ask in an interview :p

i would have responded with the answer but a bunch of people already did
CLICK TO RETURN TO TOP OF PAGE
 
Privacy Statement