What is the difference between a heuristic and an algorithm?

后端 未结 12 563
说谎
说谎 2021-01-29 17:25

What is the difference between a heuristic and an algorithm?

12条回答
  •  说谎
    说谎 (楼主)
    2021-01-29 18:04

    • An algorithm is typically deterministic and proven to yield an optimal result
    • A heuristic has no proof of correctness, often involves random elements, and may not yield optimal results.

    Many problems for which no efficient algorithm to find an optimal solution is known have heuristic approaches that yield near-optimal results very quickly.

    There are some overlaps: "genetic algorithms" is an accepted term, but strictly speaking, those are heuristics, not algorithms.

提交回复
热议问题