Invitation to Computer Science 8th Edition

Published by Cengage Learning
ISBN 10: 1337561916
ISBN 13: 978-1-33756-191-4

Chapter 1 - Exercises - Page 39: 2


Unlike algorithms, heuristics are techniques to obtain an answer for a problem, that is close to, but not exactly, an optimal solution. Heuristics are used when obtaining or applying an algorithm is impossible or impractical. This is achieved by trading optimality, completeness, accuracy, or precision for speed. Many problems in computer science that have no known fast algorithms are solved using heuristics. For example, the traveling salesman problem. --- For adding two three digits numbers, the following heuristic can be used. 1. The hundreds and thousands place of the answer is the sum of the hundreds place of the two numbers. 2. The tens and units place is 0. The above heuristic is guaranteed to give an answer that is off by less than or equal to 100. That is if the answer is $\mathrm{c},$ and the heuristic is given a value h, $|h-x|<=100$

Work Step by Step

Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.