I do not believe the answer is correct and believe this is quicker (4 turns). Separate the coins into 3 stacks of 9 (A, B, C). Weigh stack A against B (Turn 1). If A & B are equal you know the heavier or lighter coin is in C and I will skip figuring the different coin for C, because A being more or less than B will take more turns. Note which way the scale moved in reference to A (either up or down). Seperate A and B into 3 stacks with 3 coins each A1, A2, A3 and B1, B2 and B3. Remove stacks A3 and B3 from the scale. Move stacks A2 and B2 to opposite sides of the scale and measure (Turn 2). If the Scale moves the same way you know the different coin is in stack A1 or B1. If the scale moves the opposite way you know the different coin is in A2 or B2. If the scale is even, you know the different coin is in A3 or B3. In 2 turns you have narrowed it down to 6 coins. Regardless of which item you can follow the same steps for turn 3. Say the scale moved the same way as turn 1 so the coin is in stack A1 or B1. Divide stacks into 3 coins A11, A12, A13 and B11, B12, B13. Remove coins A13 and B13. Move coins A12 an B12 to opposite side of the scale (Turn 3). If the scale moves the same way you know the different coin is A11 or B11. If the scale moves a different direction you know the coin is A12 or B12. If the scale is even you know the coin is A13 or B13. Say the scale moved the opposite direction of turn 2 in turn 3. Then you know A12 is heavier or B12 is lighter. Weigh either of these coins against any other coin and by turn 4 you have not only determined which coin is different, but wether it is heavier or lighter.
Z