What is a problem that you have attempted to solve using brute force, and how well did it work? What kinds of problems seem amenable to brute force, and what kinds don’t?
Often if I’m trying to work out an algorithm to solve a problem that is possibly solvable by brute force, I’ll start by writing a quick brute-force algorithm to perform the task. Then I’ll leave it running in the background while I’m working on a better algorithm—that way, my time to implement the ‘more efficient’ algorithm is never more than the time it would have taken to brute force it.
But now that I think of it, I don’t think I’ve actually used this solution since the days when computers were a lot slower.
Often if I’m trying to work out an algorithm to solve a problem that is possibly solvable by brute force, I’ll start by writing a quick brute-force algorithm to perform the task. Then I’ll leave it running in the background while I’m working on a better algorithm—that way, my time to implement the ‘more efficient’ algorithm is never more than the time it would have taken to brute force it.
But now that I think of it, I don’t think I’ve actually used this solution since the days when computers were a lot slower.
So presumably you now just use the brute-force algorithm and forget about it?
Also, these must be one-off problems you’re solving, right?
I like this… And if there is no more efficient algorithm you can find, then your brute-force has already gotten a head start.