It's much easier to simply try for a match on an unmatched sock, and if there is no match put that sock into cache (usually somewhere else on the bed). Your cache will probably never get above about 8 socks without a match.
How to pair socks from a pile efficiently?
11–20 of 42 posts
Re: How to pair socks from a pile efficiently?
#12The real world meets the world of algorithms. I solve the issue by buying only 1 color and type of sock.
Re: How to pair socks from a pile efficiently?
#13The first answer is kind of labourous, isn't? I thought about simply removing a sock from the pile and isolating it. One for one, maybe puting the man's socks on the left and the women's on the right. So everytime you grab a new sock you can quickly check if you already isolated the pair of that one. This way you just have to grab each sock once. (this is similar to the second answer, but no need to prepare a flat pi…
That's actually how I pair my socks from the laundry pile, anything else seems kind of silly...
This kind of recursive hash partitioning is actually being done by SQL Server when it needs to hash join or hash aggregate over huge data sets.
My pile of socks is not a huge dataset. They easily fit on the seat of my couch when laid out in pairs.
Re: How to pair socks from a pile efficiently?
#14Re: How to pair socks from a pile efficiently?
#15I have 18 pairs of the same sock. I found that the most efficient way. YMMV.
Isn't this making it especially more complex because now you have to match based on wear, not just the pattern? With different patterns it's easier as the wear is constant for each pair. OCD mileage may vary :)
Also, wouldn't the wear work out to be roughly equal if you alternate socks roughly equally?
Re: How to pair socks from a pile efficiently?
#16I have 18 pairs of the same sock. I found that the most efficient way. YMMV.
Isn't this making it especially more complex because now you have to match based on wear, not just the pattern? With different patterns it's easier as the wear is constant for each pair. OCD mileage may vary :)
Re: How to pair socks from a pile efficiently?
#17I have 18 pairs of the same sock. I found that the most efficient way. YMMV.
Isn't this making it especially more complex because now you have to match based on wear, not just the pattern? With different patterns it's easier as the wear is constant for each pair. OCD mileage may vary :)
Re: How to pair socks from a pile efficiently?
#18Re: How to pair socks from a pile efficiently?
#19Earlier quoted context omitted.
Isn't this making it especially more complex because now you have to match based on wear, not just the pattern? With different patterns it's easier as the wear is constant for each pair. OCD mileage may vary :)
I upvoted because you make an interesting point, but I'm surprised to hear anybody matches socks that carefully! Also, wouldn't the wear work out to be roughly equal if you alternate socks roughly equally?
My guess is that this is a poisson process, so there would be a tail of (a few) socks which are randomly worn more than others?
Re: How to pair socks from a pile efficiently?
#20The real world meets the world of algorithms. I solve the issue by buying only 1 color and type of sock.
What happens when your brand/model is discontinued?