Very young children can work on this problem, as all that is needed is an awareness of same and different, and the idea of making groups of two. The problem also fits in with activities about pairs and counting by twos.
It would be easy to make a simple story context in which to introduce one pair of real socks, then a second pair, then mix them up to produce two pairs of mismatched socks. Now set the problem of mixing up three pairs of socks. Perhaps the children could make some paper socks to work with and work in pairs themselves. Once the task has been achieved and discussed, introduce a fourth pair of socks and challenge the children to mix them up. Stress the requirement that no two pairs can use the same combination of socks, as this is an easy mistake to make when using eight socks! For example, making a pair with a blue and red sock means that the other red and blue socks cannot be used together.
Have the children display and compare their solutions. How many different solutions are there?
For an extension, try it with 5 and 6 pairs. Is there a pattern to the number of possible solutions?
For an extra challenge, try the problem using gloves instead of socks. This adds the complication of there being a left and right glove. How does this effect the total number of possible solutions?