NP问题和NP-completeness Lecture Note 01 - ShanghaiTech CS140

ShanghaiTech CS140 | Lecture Note 01

Topic: NP and NP-completeness

Keyword: P, NP, NP-completeness, reduction

说明:笔记旨在整理我校CS130课程的基本概念。由于授课及考试语言为英文,故用英文为主,中文为辅的方式整理。由于是整理,尽提供最低限度的解释,以便提供简洁快速的查阅。

1 P 和 NP

1.0 The class P(P类型问题)

Def1.0.1: P is the set of all problems that can be solved by a polytime algorithm.

Def1.0.2: A polynomial time (polytime) algorithm is one that runs in O(n^k) time, for some constant k, when input has size n.

Recall: What does O(n^k) time mean? A asymptotic analysis of real running time f(n) via some evaluation. O(n^k)  means that {lim}_{n\rightarrow \infty} \frac{f(n)}{n^k}<\infty.

1.1 The class NP (NP类型问题)

常见谬误:认为NP类型问题就是不能用多项式时间解出的问题,实则是一个misnormer。NP类型问题在历史上,确实未被证明有多项式时间解出的solution。但是这不代表NP问题的定义是:不能用多项式时间解出的问题。准确地讲,该类问题应被称为非P问题。下面先对一些前提定义,再给出NP问题的定义。

Remark: NP = Nondeterministic polynomial time.

Def1.1.1: An instance of a problem consists of an input for the problem.

例子:排序问题的instance 可以是一个我们想要排序的集合 {3, 1, 2, 4}。in

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值