This Is a Certified Answer

Certified answers contain reliable, trustworthy information vouched for by a hand-picked team of experts. Brainly has millions of high quality answers, all of them carefully moderated by our most trusted community members, but certified answers are the finest of the finest.
It must be given whether the defected ball is lighter than others or heavier than others. Otherwise, it is not possible to solve it in 3 weightings.

This problem also illustrates the binary division approach.

Let us say the ball is lighter than other balls.

Take any six balls on one side and the remaining six on the other side of balance (weighting machine).

One side goes up. So lighter ball is in that group of six balls. Keep the other six (good) balls aside.

From the lighter group of 6 balls, keep 3 balls on side of balance and 3 on the other side.  One side goes up. So keep the heavier set of 3 balls away.

Take the 3 balls which were lighter. Pick any two, put one on one side of weighting machine and another on the other side. One ball is in hand. There are two possibilities.

Both balls weigh equally. Then the ball in hand is the lighter ball.  
One of the balls weighs less. Then that ball is what we are looking for.

So problem is solved.

it is not said that the ball is heavy or light
if we do not know if ball is heavier or lighter than others, then it is not possible