Solution to 7):

Divide the twelve marbles into three sets of four, which we shall label 1, 2 and 3. Weigh sets 1 and 2.

Case 1: The scale is balanced. Choose any three out of set 1 or 2 and three from set 3, and weigh these two sets of three.

Case 1.1: The scale is balanced. Hence the remaining marble of set 3 is the one you are looking for, and weighing it against any other marble will tell you whether it is heavier or lighter.

Case 2: If set 1 is heavier than set 2, swap a marble from set 1 with one from set 2, and replace the remaning set 2 marbles by three marbles from set 3.

Case 2.1: If the side with three marbles from set 1 is lighter, weigh the set 2 marble of the same side against a set 3 marble.

Case 2.1.1: If the set 2 marble is lighter than the set 3 marble, it is the one.

Case 2.1.2: If the scale is balanced, the set 1 marble with the three set 3 marbles is the one, and is heavier.

Case 2.2: If, following the instructions of Case 2, the scale is balanced, then weigh two of the three set 2 marbles which are not on the scale.

Case 2.2.1: If the scale is balanced, it is the third of these three set 2 marbles, and it is lighter.

Case 2.2.2: If the scale is unbalanced, the lighter side will contain the odd marble.

Case 2.3: If the opposite of Case 2.1 occurs, namely that the set of three set 1 marbles and one set 2 marble is heavier than the set of three set 3 marbles and one set 1 marble, then weigh any two of the set 1 marbles.

Case 2.3.1: If the scale is balanced it is the third of these three set 1 marbles, and it is heavier.

Case 2.3.2: If the scale is unbalanced, the heavier side will contain the odd marble.

Case 3: If set 2 is heavier than set 1, all of Case 2 applies, but with "set 1" and "set 2" swapped.