【释义】NP complete概念浅析(涵盖:P问题,NP问题,NP完全问题,NP难问题)

前言

创作开始时间:2021年3月22日08:09:09

如题。这里记录:P问题,NP问题,NP完全问题,NP难问题的概念。

正文

在参考:

之后,我大概了解了NP complete问题的概念。
这种深入浅出的文章确实很有价值。能够帮助人快速了解概念。

这里简要记录:

1、P问题

P问题:能够在多项式时间内被解决的问题。

比如说,给10个、20个、30个… 元素排序,复杂度是 x 2 x^2 x2,这里的 x 2 x^2 x2就是一个多项。

2、NP问题

NP问题:能够在多项式时间内使用非确定性算法(non-deterministic)被解决的问题。

Now, the “N” in “NP” refers to the fact that you are not bound by the normal way a computer works, which is step-by-step. The “N” actually stands for “Non-deterministic”. This means that you are dealing with an amazing kind of computer that can run things simultaneously or could somehow guess the right way to do things, or something like that.

简单来说就是,必须以非常规方法才能在多项式时间内解决的问题,就叫做NP问题。

3、NP-complete问题(即:NP完全问题)

NP-complete问题:只能通过非确定性算法,在多项式时间内解决的问题,叫做NP完全问题。

一般来说,非常规方法既可以解决P问题,也可以解决NP问题,所以,只有用非常规方法才能解决的问题,才能叫做NP完全问题。

4、NP完全问题可能不会长久存在

Oh, one more thing, it is believed that if anyone could ever solve an “NP-Complete” problem in “P” time, then all “NP-complete” problems could also be solved that way by using the same method, and the whole class of “NP-Complete” would cease to exist.

看看就行。

5、示例

旅行商问题。
就是一个NP完全问题,因为其开销不能在多项式时间内解决,而是一个“factorial time”,factorial time (即: t = n ! t = n! t=n!)显然不是一个多项式。

可参考:

6、NP-Hard问题(即:NP难问题)

NP-Hard问题:和NP问题一样困难,或者更加困难的问题。

When a problem’s method for solution can be turned into an NP-Complete method for solution it is said to be “NP-Hard”.

7、关系

同样参考前述网站:

在这里插入图片描述

小结

没想到花了20min。惊。

以上。

创作结束时间:2021年3月22日08:31:52

参考文献

还可以看看:

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值