in reply to How many different varieties (color, size, etc) of socks do you have in your sock drawer?

I am too financially conservative (read: cheap) to discard socks unnecessarily. To avoid this, I always purchase N>1 pairs of identical socks at a time, thereby insuring that I will always have N-1 pairs of usable socks even after the second sock of a particular variety becomes dryer food (or gets a hole).

I also don't discard old, valid pairs of socks when I buy a new batch, so I end up with K>>1 varieties of socks in the drawer. Still, for any drawer containing M pairs of socks, we typically find that K < M/2, and often much smaller than that.

Inasmuch as my socks are typically worn, washed, and stored in pairs, the whole question of pulling more than one matching sock in the morning never comes up. Besides that question has already been solved, so today I can simply use socks; and leave the actual counting as an exercise for the grad students. Matching those socks to my outfit in the dark, however, remains NP-hard.

  • Comment on Re: How many different varieties (color, size, etc) of socks do you have in your sock drawer?
  • Download Code