Basically, a heuristic solution does not try for the perfect solution, but instead looks for one "good enough."
Why do this? Because for some problems, but the time you compute the perfect solution, it doesn't do any one any good.
For a timely example in the US, say you as a third party candidate are running for President this year and need to visit 10000 cities once each, but have limited gas expense money so want to minimize distance travel. An exact solution may well take so long to compute that once the solution comes in, it's too late it visit any of them!
So instead a popular simple and fast heuristic alogorithm to use takes advantage of the triangle inequality rule to ensure that you travel no more than 2X the min distance, which is "close enough" for you.
However, if instead you waited til the last minute and need to minimize total driving time that particular heuristic algorithm fails! This is because triangle inequality is broken minimizing total driving time. Instead, a more complex heuristic alogrithm must be used.
Why do this? Because for some problems, but the time you compute the perfect solution, it doesn't do any one any good.
For a timely example in the US, say you as a third party candidate are running for President this year and need to visit 10000 cities once each, but have limited gas expense money so want to minimize distance travel. An exact solution may well take so long to compute that once the solution comes in, it's too late it visit any of them!
So instead a popular simple and fast heuristic alogorithm to use takes advantage of the triangle inequality rule to ensure that you travel no more than 2X the min distance, which is "close enough" for you.
However, if instead you waited til the last minute and need to minimize total driving time that particular heuristic algorithm fails! This is because triangle inequality is broken minimizing total driving time. Instead, a more complex heuristic alogrithm must be used.
Comment