Begin by computing the number of all the possibilities:
It is given by the following formula:
Computing the number of favorable cases:
Exactly one pair of socks with the same color means either one magenta pair,
or one cyan pair, or one black pair or one white pair:
Number of possibilities with one magenta pair means"a magenta pair plus two socks with different colors from three possibilities" means 3 possibilities.
Same computation for the other colors.
Adding we get:
By definition, the probability of an event is the number of favorable cases over the number of possible cases:
The probability is