4 ms·
I use the Birthday Paradox when I'm searching for matching socks in the morning -- rather than pick a sock and look for one that matches it, I accumulate socks
by jkempf 16y ago
I use the Birthday Paradox when I'm searching for matching socks in the morning -- rather than pick a sock and look for one that matches it, I accumulate socks and choose the first pair that match.
- detcader 16y agoinstead of casting other types, just make everything a string: buy a whole lot of pairs of the same type of sock so you don't have to worry about matching types!
- silentbicycle 16y agoThat's an excellent metaphor! My other favorite programming metaphor is about skiplists: they're like a set of subway lines, with some extra express lines that skip a random (and increasing, for each level) number of stops.
- mahmud 16y agoI use Lisp for that same purpose whenever I do my laundry. I cons my socks ahead of time, then serialize the pairs to a drawer. O(1) lookup FTW!
- catch404 16y agoQuite possibly the geekiest hn comment I've read :)
- 2arrs2ells 16y agoI use the futon in my bedroom as an L1 cache for frequently worn clothes.
- kragen 16y agoI wrote this thing "on the complexity of sock-matching" a few years back: http://www.mail-archive.com/kragen-tol@canonical.org/msg00084.html http://www.mail-archive.com/kragen-tol@canonical.org/msg0008... It was more about the problem of matching socks when I put them away, but the same principle applies.