So 13 balls... split them up into groups of 4,4,5.
Weight 4 vs 4. If they balance then we know that the odd ball is one of the 5.
We weight 3 of the 5 against 3 of the previously weighed ones which we know are normal.
If they balance, weight 1 of the 2 remaining from the group of 5 against a normal... if it balances then the last ball is odd... if it doesnt then it is odd.
If 3 doesn't balance(say heavier)... then weight any 2 of the 3 against each other. If they balance, the 3rd is odd, if they don't the heavier one is odd.
If the first weighting didn't balance(say left was heavier), 1 of the left 4 could be heavy or 1 of the right 4 could be light.
So we have H1, H2, H3, H4(possible heavy ones) and L1, L2, L3, L4(possible light ones)
Weight H1, H2, L1 vs, H3, L2, and a normal(N)
If left side is heavy then either one of H1, H2 is heavy or L2 is light. Weight H1 vs. H2 to find heavy one, if they balance then L2 is light.
If right side heavy then H3 is heavy or L1 is light. Weight H3 against normal to check which one is odd.
If H1,H2,L1 vs. H3,L2,N balances then either H4 is heavy or one of L3 or L4 is light. Simply weigh L3 vs L4 to see if they balance. If they do H4 is heavy if not the light one is odd.
Very tough question.