Throughout this book we will seek algorithms that are correct and efficient, while being easy to implement. All three goals are obviously desirable, but they may not be simultaneously achievable. For this reason, one or more of them are often ignored. Theoretical algorithm designers have traditionally been unconcerned with implementation complexity, since they often do not program their algorithms. Instead, theoreticians focus on efficiency and correctness. Conversely, quick-and-dirty is typically the rule of thumb in industrial settings. Any program that seems to give good enough answers without slowing the application down is acceptable, regardless of whether a better algorithm exists. The issue of finding the best possible answer or achieving maximum efficiency usually does not arise in industry until serious troubles do.
Here, we stress the importance of recognizing the difference between algorithms, which always produce a correct result, and heuristics, which often do a good job without providing any guarantee. We also emphasize the potential efficiency gains resulting from using faster algorithms.