How to show that A, B and C are not independent? 
Give an example of 3 events A,B,C which are pairwise independent but not independent. Hint: find an example where whether C occurs is completely determined if we know whether A occurred and whether B occurred, but com- pletely undetermined if we know only one of these things.

Source: Stat 110 Homework 110
The solutions is:

Consider two fair, independent coin tosses, and let A be the event that the first toss is Heads, B be the event that the second toss is Heads, and C be the event that the two tosses have the same result. Then A,B,C are dependent since $P(A\cap B\cap C) = P(A\cap B) = P(A)P(B) = 1/4 \neq 1/8 = P(A)P(B)P(C),$ but they are pairwise independent: A and B are independent by definition; A and C are independent since $P(A \cap C) = P(A \cap B) = 1/4 = P(A)P(C),$ and similarly B and C are independent.

I do not understand why comparing the pairwise with the complete probability can show independence.

The solution seems not to be comparing pairwise and total probability in order to
show dependence or independence.
The solution is actually comparing $P(A \cap B \cap C)$ with $P(A)P(B)P(C)$.
The expressions between $P(A \cap B \cap C)$ and the value $\frac14$ are merely
one way of computing the value of $P(A \cap B \cap C)$:
since $(A \cap B) \subset C$ (that is, if both tosses are heads then the 
tosses have the same result), it follows that $A \cap B \cap C = A \cap B$
and therefore $P(A \cap B \cap C) = P(A \cap B)$.
And of course $P(A \cap B) = \frac14$.
So we find that $P(A \cap B \cap C) = \frac14$ but $P(A)P(B)P(C) = \frac18$,
therefore $P(A \cap B \cap C) \neq P(A)P(B)P(C)$, therefore
there is a dependence among $A$, $B$, and $C$.
Granted, this is all a bit cryptic when written this way:
$$P(A\cap B\cap C) = P(A\cap B) = P(A)P(B) = 1/4 \neq 1/8 = P(A)P(B)P(C).$$
The comparison that actually matters, $P(A\cap B\cap C) \neq P(A)P(B)P(C),$
is in there, but it's a bit hard to see due to all the clutter of calculations.
It probably seemed clearer to the person writing this up because they 
already knew how all the parts would relate to each other.
