Here is a very interesting problem based on counterfeit coin.
There are five coins three of them are good one of them is heavier and one of them is lighter. It is not given whether the amount of extra weight in the heavier coin is the same as the amount of lost weight in the lighter coin. you have a common balance no weights are given there are only two states of the common balance – balanced or unbalanced using three weighings find the two counterfeit coins
step1: measure a and b
if they are equal
step 2: measure c and d —– c say c<d
step 3: b and e
step 4: if b = e then a, b, e are good coins, c, d are bad coins
step 5: if b < e then e must be the heavier of the counterfeit coins, then c must be the lighter of the counterfeit coins and a,b, d are good coins
step 6: if b> e then e must be the lighter of the counterfeit coins, then d must be the heavier of the counterfeit coins, then a, b, c are good coins; d and e are bad coins.
now if a < b
step 1.1: measure c and d. If c = d then the previous case follows. If c< d then
step 1.2: either a or c is good and the other one is the lighter counterfeit coin. For b and done is good and the other is heavier counterfeit
step 1.3 measure b and e. if b = e then both b and e are good coins. In that case, a is the lighter counterfeit and c is a good coin. Therefore b, c, e are good coins and a, d are bad coins
step 1.4 if b > e then b is the heavier counterfeit. Then e and d are good coins. In that case, a is also good as c is smaller than d it is the heavier counterfeit.