A complex and totally-not-convoluted algorithm for the most discerning sock enthusiast.
Red Socks (12)
Blue Socks (14)
Purple Socks (7)
Green Socks (4)