启发式算法理解

总是在论文里看到启发式算法,百度了几次启发式算法是什么也没有记住。

Heuristic Algorithm,其中的Heuristic的中文翻译是启发式,但是英文翻译更能表达其本身的含义:

Heuristic: enabling someone to discover or learn something for themselves

好了知道了启发式是什么,那启发式算法是什么?还是要看英文翻译啊…中文搜索出来的都看不懂

A heuristic algorithm is one that is designed to solve a problem in a faster and more efficient fashion than traditional methods by sacrificing optimality, accuracy, precision, or completeness for speed. Heuristic algorithms often times used to solve NP-complete problems, a class of decision problems. In these problems, there is no known efficient way to find a solution quickly and accurately although solutions can be verified when given. Heuristics can produce a solution individually or be used to provide a good baseline and are supplemented with optimization algorithms. Heuristic algorithms are most often employed when approximate solutions are sufficient and exact solutions are necessarily computationally expensive.

好的,也就是说启发式算法是一种相对于最优化算法,没有那么高的准确率,没有那么好的效果,但在有限的时间里可以找到一个可以接受的较优解。一般是用来解决NP完全问题。(by zzk)

那么NP完全问题又是什么样的呢?

启发式算法有哪些例子呢?

NP-Complete Problem

这里面还牵扯到NP问题、 NP-Complete问题、NP-hard问题,现在不挖坑。

在网上随便找了一个例子:

例如,著名的推销员旅行问题(Travel Saleman Problem or TSP):假设一个推销员需要从南京出发,经过广州,北京,上海,…,等 n 个城市, 最后返回香港。 任意两个城市之间都有飞机直达,但票价不等。假设公司只给报销 C 元钱,问是否存在一个行程安排,使得他能遍历所有城市,而且总的路费小于 C?

推销员旅行问题显然是 NP 的。因为如果你任意给出一个行程安排,可以很容易算出旅行总开销。但是,要想知道一条总路费小于 C 的行程是否存在,在最坏情况下,必须检查所有可能的旅行安排。

Common Heuristic Algorithm

目前比较通用的启发式算法一般有模拟退火算法(SA)、遗传算法(GA)、蚁群算法(ACO)、人工神经网络(ANN)等

具体的这些算法思想是什么样的可以再去看哈。