Divide the thirty coins into four groups of 9, 9, 9, and 3.
Label the 9 coin piles as 9a, 9b, and 9c.
Weighing number one is 9a vs. 9b.
If they balance, the odd coin is in either in 9c or in the pile of 3.
If so, then weighing Number 2 is 9a vs. 9c.
If they balance, then the odd coin is in the pile of 3.
Label the three coins the pile of 3 as 3a, 3b, and 3c.
Weighing number 3 is 3a vs. 3b.
If they balance, the odd coin is 3c.
In that case, weighing number four is 3c vs. any other coin to determine if the odd coin is lighter or heavier than the rest.
If after weighing No. 3, coin 3a does not balance against coin 3b, then one of them must be the odd coin.
Remove the lighter coin, let’s say it’s 3b, and place coin 3c on the scale against the remaining heavier one, 3a.
If they balance, then the odd coin is 3b and it is lighter.
If they do not balance, then the odd coin is 3a and it is heavier.
Now let’s go back and see what happens if the first weighing has a different outcome.
Weighing number one was 9a vs. 9b. Let’s say that they do NOT balance. That means that the odd coin is in either 9a or 9b.
Note which of the two is heavier. Let’s say 9a is heavier.
Weighing number two is 9a vs. 9c. They will either balance or 9a will be heavier. There is no possibility that 9a will be lighter.
If 9a and 9c balance that means that the odd coin is in 9b and that it is lighter.
If 9a is again heavier, that means that the odd coin is in 9a and it is heavier than the rest. Let’s say it’s in 9a and it’s heavier.
Now divide 9a into three groups of three coins each.
Label them 3A, 3B, and 3C.
Weighing number three is 3A vs 3B.
If they balance then the odd (heavier) coin is in 3C.
If they do not balance, the odd (heavier) coin is in the heavier of 3A or 3B.
Take the group of the three that contains the odd coin and divide it into 3 individual coins: 1a, 1b, and 1 c.
The fourth weighing is 1a vs. 1 b.
If they balance the odd is is 1c and it is heavier.
If they do not balance, then the odd coin is the heavier of 1a and 1b.
Using this same methodology, the odd coin and its status may be determined no matter how each of the weighings turn out.