NP完全性和近似算法
在理解NP完全性之前,笔者想引入关于科学与伪科学的定义。凡可接受实践检验、可被证实和被否正的为科学,相反之为非科学,而伪科学是非科学之子集,与科学相对立,认定非科学为科学的即是伪科学。三者关系可简化为:科学相反于非科学、对立于非科学子集伪科学。集合的运算关系见下面,科学定义为S、非科学定义为NS、伪科学定义为FS。
算法是用来解决问题的,一个问题能否在多项式时间内完成是衡量问题复杂度和算法有效性的标准。多项式时间就是指时间复杂度是个多项式。对于解决问题的算法,在其输入规模为下,其最坏运行时间为,其中k为常数,则问题在多项式时间内可解。显然,现实中很多问题是暂时无法找到多项式时间内的算法来解决,于是,以是否存在多项式时间内的算法来界定问题复杂度,存在则可解,反之则无解。NP集中在多项式复杂度的非确定性问题的研究上,属于科学,可被证实和被否正。
再说明下判定问题和最优化问题。判定问题是指寻求有穷步骤内确定是否具有某一特定的性质的一种能行方