4 pairs of matching socks out of a drawer with lots of socks in 3 different colours.
As no colour is preferred, let's call the colours a,b,c.
In order to get 4 pairs you'll obviously have to take 8 socks. If, furthermore, only colour-matching pairs are allowed, and a pair consists of 2 socks, then the lucky case would be, if there is an even number of socks of each colour.
1. (8a, 0b, 0c)
2. (6a, 2b, 0c)
3. (4a, 4b, 0c).
Again, as there is no preferred colour, a case like (0a, 6b, 2c) would be treated as identical to 2. (6a, 2b, 0c). [Yes, 0 has some odd properties, but it is definitively an even number ;) ].
If, however, you find an odd number of socks in one of the colours, then there would be also an odd number in exactly one other stack of socks. Each of these two stacks would be off by 1; thus, you'd have 3 pairs already. If you put the pairs away, then you are left with the situation:
4. (1a, 1b, 0c).
Applied to the case above (1. through 3.) this reduces to:
5. (0a, 0b, 0c).
This is a textbook example of modular arithmetic.
en.wikipedia.org/wiki/Modular_arithmetic
If you take one other sock out of the drawer and it matches either colour stack a or b in 4. (1a, 1b, 0c) , then you're done. But in the worst case (the sock taken is of colour c, and the situation is (1a, 1b, 1c) ), you'd have to take a 10th sock. In which case you'd get your 4th pair independent of the colour of the 10th sock.
What is the least number of socks that must be taken out of the drawer to be sure of having 4 pairs of matching socks?
10 socks.