WHAT
front page
entry archive
my flickr photos
professional home
my twitter
my wishlist
my tumblog
my facebook
WHO
2010-02-01 : programming
Write a function that accepts a functor, a container of items, and a desired choice size. The code’s purpose is to produce all choices from the input and apply the functor to the selected subset.
Everybody with a computer science degree has been warned of the perils (or joys) of combinatorics and binomial coefficients. That said, I’m convinced (with zero data points) that very few people have ever actually implemented such a toy. With all the focus on implementing the clever and elegant algorithms, I think it might be a lost art actually implementing combinatoric brute-force algorithms.
I may be wrong.
“I think it might be a lost art actually implementing combinatoric brute-force algorithms.”
Maybe at the toy stage.
All problems are solvable given sufficient time and sufficient energy. But man, usually there’s a easier way besides brute force.
— Bill 2 February 2010 #
That’s my point, I think. There’s almost always a better way or a more efficient way for the general or specific problem. But, sometimes, there’s a small search space and a trivial brute force approach … and spending the time writing the elegant solution just isn’t worth it.
In these scenarios, I’m pretty sure very few people have actually ever written this sort of solution.
— Aaron N. Tubbs 2 February 2010 #