Answer:
As stated in the question the counterfeit coin is lighter than the
original coin. Desired algorithm to find counterfeit coin is given
below:-
STEP 1: if n== even, divide the coins into 2 equal groups of n/2
and n/2.
STEP 2: check which group is lighter, lighter group would be the
one which contains the counterfeit coin.
We will have to repeat all the steps mentioned here for the
subgroup as well.
STEP 3: if n==odd, randomly remove one coin from the group and then
divide remaining (n-1) into 2 groups of
(n-1)/2 each, there could be two possibility both group are equal
in this case one coin which was removed
is counterfeit coin. else follow same step as above for lighter
weigh group of (n-1)/2
STEP 4: one number of element ==2 check and find the lighter coin
among the two as the counterfeit coin.
From the above algorithm its clear that on every weighing steps we
are able to decrease the number of elements to half, so on worst
case scenario it can become
< k/2+k/4+k/6..... 2 (number of terms in above algorithm, let it
be m)
2n+1 < 3^m
n < (3^m-1)/2
log(2n+1) < m*log(3) //taking log both sides
log(2n+1)/log(3) < m
So worst case number weighing for n coins would be m =
log(2n+1)/log(3)
(plz give me a thums up...if my answer helped you and if
any suggestion plz comment, Yr thums up boost me)
2. (10%) Suppose that among n identical-looking coins, one is fake. With a balance scale, we...
You have 80 coins that are identical in appearance. Among them there are three fake coins and you know which ones. The genuine coins all have the same weight and the fake coins all have the same weight, but the fake coins are lighter than the real ones. Your friend knows that among the 80 coins there are either three or two fake coins. Without revealing the identity of any of the 80 coins, how can you use a pan...
a) In a collection of 900 coins, one is counterfeit and weighs either more or less than the genuine coins. Find a good lower bound on the number of balance scale weighings needed to identify the fake coin and determine whether it is too heavy or too light. Assume the balance scale has three states: tilted left, tilted right, or balanced. b)In a collection of 10 coins, 2 coins are counterfeit and weigh less than the genuine coins. Find a...
A friend of yours is given the following problem: You have 8 seemingly identical coins, among which you are told that one is a counterfeit. The counterfeit is known to be heavier than a true coin. You have access to a simple two-pan balance. What is the MINIMUM number of weighings you need to use in order to find the counterfeit coin? Your friend's answer is the following: I can identify the counterfeit coin by proceeding as follows: Weighing 1:...