Pages

Friday, 2 September 2016

Socks Algorithm



From BBC news:

People often end up pulling out a sock, one at a time, and searching for its partner. But sorting socks this way can be a slow process.
If you only owned one pair of socks it would be fine - apart from the personal hygiene implications.
But each new pair added to the mix makes things harder in two different ways - first, you've got to pair up more socks, and second, each sock that you're trying to pair up is swimming in a larger pile of unmatched socks.
Two pairs will take four times longer to match, on average, than one pair. Five pairs will take 25 times longer and 100 pairs will take 10,000 times longer, according to computer scientist and co-author of Algorithms to Live By, Prof Brian Christian.
Question for thought:

In your new OneNote notebook, create a page for algorithms, give it a title and suggest an idea of speeding up the sorting of socks.


No comments:

Post a Comment