Odd ball
You are given 12 balls and one of them has a weight defect - either heavier or lighter. We don't know which one it is. You are allowed to use the balance only three times. Find out which one of the twelve is the defective ball?
Answer:
It is always possible to find the odd ball in 3 weighings and to tell whether the odd ball is heavier or lighter.
Step: 1) Take 8 balls and weigh 4 against 4. If both are not equal, goto step 2. If both are equal, goto step 3.
Step: 2) One of these 8 balls is the odd one. Name the balls on heavier side of the scale as H1, H2, H3 and H4. Similarly, name the balls on the lighter side of the scale as L1, L2, L3 and L4. Either one of H's is heavier or one of L's is lighter. Weigh (H1, H2, L1) against (H3, H4, X) where X is one ball from the remaining 4 balls inintial weighing. If both are equal, one of L2, L3, L4 is lighter. Weigh L2 against L3. If both are equal, L4 is the odd ball and is lighter. If L2 is light, L2 is the odd ball and is lighter. If L3 is light, L3 is the odd ball and is lighter. If (H1, H2, L1) is heavier side on the scale, either H1 or H2 is heavier. Weight H1 against H2. If both are equal, there is some error in weighing. If H1 is heavy, H1 is the odd ball and is heavier. If H2 is heavy, H2 is the odd ball and is heavier. If (H3, H4, X) is heavier side on the scale, either H3 or H4 is heavier or L1 is lighter. Weight H3 against H4. If both are equal, L1 is the odd ball and is lighter. If H3 is heavy, H3 is the odd ball and is heavier. If H4 is heavy, H4 is the odd ball and is heavier.
Step: 3) One of the remaining 4 balls is the odd one. Name the balls as C1, C2, C3, C4. Weight (C1, C2) against (C3, X) where X is anyball from the first weighing of 8 balls. If both are equal, C4 is the odd ball. Weigh C4 with X. If both are equal, there is some error in weighing. If C4 is heavy, C4 is the odd ball and is heavier. If C4 is light, C4 is the odd ball and is lighter. If (C1, C2) is heavier side, one of C1, C2 is heavier or C3 is lighter. Weigh C1 and C2. If both are equal, C3 is the odd ball and is lighter. If C1 is heavy, C1 is the odd ball and is heavier. If C2 is heavy, C2 is the odd ball and is heavier. If (C1, C2) is lighter side, one of C1, C2 is lighter or C3 is heavier. Weigh C1 and C2. If both are equal, C3 is the odd ball and is heavier. If C1 is light, C1 is the odd ball and is lighter. If C2 is light, C2 is the odd ball and is lighter.
Answer:
It is always possible to find the odd ball in 3 weighings and to tell whether the odd ball is heavier or lighter.
Step: 1) Take 8 balls and weigh 4 against 4. If both are not equal, goto step 2. If both are equal, goto step 3.
Step: 2) One of these 8 balls is the odd one. Name the balls on heavier side of the scale as H1, H2, H3 and H4. Similarly, name the balls on the lighter side of the scale as L1, L2, L3 and L4. Either one of H's is heavier or one of L's is lighter. Weigh (H1, H2, L1) against (H3, H4, X) where X is one ball from the remaining 4 balls inintial weighing. If both are equal, one of L2, L3, L4 is lighter. Weigh L2 against L3. If both are equal, L4 is the odd ball and is lighter. If L2 is light, L2 is the odd ball and is lighter. If L3 is light, L3 is the odd ball and is lighter. If (H1, H2, L1) is heavier side on the scale, either H1 or H2 is heavier. Weight H1 against H2. If both are equal, there is some error in weighing. If H1 is heavy, H1 is the odd ball and is heavier. If H2 is heavy, H2 is the odd ball and is heavier. If (H3, H4, X) is heavier side on the scale, either H3 or H4 is heavier or L1 is lighter. Weight H3 against H4. If both are equal, L1 is the odd ball and is lighter. If H3 is heavy, H3 is the odd ball and is heavier. If H4 is heavy, H4 is the odd ball and is heavier.
Step: 3) One of the remaining 4 balls is the odd one. Name the balls as C1, C2, C3, C4. Weight (C1, C2) against (C3, X) where X is anyball from the first weighing of 8 balls. If both are equal, C4 is the odd ball. Weigh C4 with X. If both are equal, there is some error in weighing. If C4 is heavy, C4 is the odd ball and is heavier. If C4 is light, C4 is the odd ball and is lighter. If (C1, C2) is heavier side, one of C1, C2 is heavier or C3 is lighter. Weigh C1 and C2. If both are equal, C3 is the odd ball and is lighter. If C1 is heavy, C1 is the odd ball and is heavier. If C2 is heavy, C2 is the odd ball and is heavier. If (C1, C2) is lighter side, one of C1, C2 is lighter or C3 is heavier. Weigh C1 and C2. If both are equal, C3 is the odd ball and is heavier. If C1 is light, C1 is the odd ball and is lighter. If C2 is light, C2 is the odd ball and is lighter.