1 / 14

P 对 NP 问题 (Computation )

becky
Download Presentation

P 对 NP 问题 (Computation )

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. P & NP多项式时间算法,简单!非多项式时间算法,复杂!找不到可解算法的问题,复杂!旅行商问题(Traveling Salesman Problem):找出一条通过所有城镇并回到原出发点的最短路线1→2→3(1→3→2) → …… , 这两种走法的距离不一样。可能的路线: n!怎样找出总路程最短(省钱)的一种走法?穷举法!没有最佳的方法。NP完全问题应用:运输公司配送货物;邮递员;生产线上组装工序;……穷举法:如果 T(20) = 1 h, T(21) = 21 h, … , T(25) = 728 y

  2. P对NP问题(Computation) • 背景一例:素数分解 • 验证整数n是否为素数,是一个很难的问题「很难」=很多“Computer time”= 很慢 • 验证:素數 p 是否n的因子是一個「容易」的問題 「容易」=很少“Computer time” = 快

  3. P问题:很少“Computer time”的问题 (Polynomial time) NP问题: (Non-deterministic polynomial) ( Non-P) • 检验「准答案」是否真的是解是P问题。 • 但要找出「解」來,看起來就难很多。

  4. P类 (Polynomial) • 判定问题:只有肯定和否定两种答案 • 优化问题可以化作判定问题处理 • P类 • 具有多项式时间算法的判定问题形成的计算复杂性类 • 猜测TSP(Traveling salesman problem)不属于P(J.Edmonds 1965)

  5. 何谓NP问题 • P是一個凡能用 O(n^k) 计算量解決之問題之集合,无法用 O(n^k) 的计算量來解決,大家都猜測它们可能在 P之外,即其計算量是呈指數增加的。 • 直到1971年古克 (Stephen A. Cook) 發表了〈The Complexity of Theorem Proving Procedures〉才把 P之外的問題歸成了三大類,即 NP, NP-complete 及 NP-hard,。 • 什么叫做 NP?NP 是英文 nondeterministic polynomial 的缩写,意思就是非確定性的多項式时间。

  6. P對NP問題: P=NP? NP完備(NP-complete)問題:─ 問題是NP完備,如果它是 P, 就所有其他的NP問題都是 P。 所以要証明P=NP,只需找出一個是P的NP-complete問題。 註:「掃地雷」(Minesweeper)遊戲是─ NP-complete問題。

  7. P & NP • 问题的复杂性和算法的复杂性 • 算法的复杂性(算法的性质):解决问题的一个具体的算法的执行时间 • For example, sort algorithms • Bubble sort, O(n2) • Quick sort, O(nlgn) • 问题的复杂性(问题本身的复杂程度,问题固有的性质):解决该问题的所有算法中最好算法的复杂性 • For example, sort problem, O(nlgn) • 问题的复杂性分析,考虑一类简化问题,即判定问题 • 问题的复杂性不可能通过枚举各种可能的算法来得到,为了研究的简单,仅考虑一类简单的问题,即判定问题。

  8. Problems in NP Class • P ? Polynomial • NP: N? • not Non-Polynomial,but Non-Deterministic • (多项式复杂程度的非确定性问题,即多项式时间内能验证的判断问题。例如 C = A*B, 先要猜想A和B(而没有公式能直接求出A和B,非确定性的意义也体现在这里),再验证C = A*B是否成立。) • Deterministic Problem, for example • 加减乘除:只要按照公式推导,按部就班一步步来,就可以得到结果。

  9. Problems in NP Class • Non-Deterministic Problem(无法按部就班直接地计算出来,e.g.) • Factorization(大的合数分解质因数的问题):M = ?× ? • A Hamiltonian cycle of a graph G is a cycle that visits each vertex of the graph exactly once. • Problem: Given a graph G, does G have a Hamiltonian cycle?

  10. The current opinion is NP NP-Complete P Does P = NP ? • Clearly all problems in P are in NP, i.e. P  NP. • Does P = NP? • This is the biggest unsolved and the most challenging problem in computer science!

  11. NP-Complete Class • Clearly all problems in P are in NP, i.e. P  NP. • Intuitively, NP-Complete is the class of the “most difficult” problems in NP. • All NP-Complete problems appear to be difficult. • No polynomial-time algorithm has been found for any NP-Complete problem.(对任何NPC,尚没有找到多项式算法). For example, • Hamilitonian cycle problem • Boolean Satisfiability(布尔可满足性问题) • 如果NP问题的所有可能答案,都是可以在多项式时间内进行正确与否的验算的话,就叫完全多项式非确定问题(NPC)。 • 一个可判定性问题C是NP完全(NPC)的,如果: • 1. 这个问题是NP问题。 • 2. 所有其他的NP问题可以归约为C问题。

  12. NP NP-Complete P NP-Complete Class • 所有的NPC都可以在转换为Boolean Satisfiability • Cook 于1971找到证明了Sat是NPC,现在发现的NPC已经超过3000个 • 如果任一NPC问题多项式可解,则所有NPC都是多项式可解! • Complete(封闭的、完全的)

  13. 计算难度比较的标准 • 难易是比较而言的 • 多项式时间归约(Karp归约 1972) • 定义 • 问题A多项式时间内转化为问题B的特殊情况,则称A可多项式归约于B,记为 • 转化时间为多项式 • 对于A的输入I 的回答与其对应的B的输入 f(I) 一致

  14. NPC P NP 如果 ,则指数灾难无法避免 现在的估计 P=?NP (P-NP问题) P=NP

More Related