算法导论课件第18讲NPCompleteness1章节
45页1、1,NP-Completeness proof,Three classes of problems P: problems solvable in poly time. NP: problems verifiable in poly time. NPC: problems in NP and as hard as any problem in NP.,2,NP-Completeness (verifiable),For example, suppose that for a given instance G, u, v, k of the decision problem PATH, we are also given a path p from u to v. We can easily check whether the length of p is at most k, and if so, we can view p as a “certificate“ that the instance indeed belongs to PATH.,3,NP-Completeness (v
2、erifiable),例如,假定对判定问题 PATH的一个给定实例 G, u, v, k 同时也给定了一条从u到v的路径 p 。 我们可以检查p的长度是否至多为k 。如果是的,就可以把p看做是该实例的确属于PATH的 “证书”。,4,NP-Completeness (verifiable),Verifiable in poly time: given a certificate of a solution, could verify the certificate is correct in poly time. Examples: Hamiltonian-cycle, given a certificate of a sequence (v1,v2, vn), easily verified in poly time.,5,NP-Completeness (verifiable),The problem of finding a hamiltonian cycle in an undirected graph has been studied for over a hundred y
3、ears. Formally, a hamiltonian cycle of an undirected graph G = (V, E) is a simple cycle that contains each vertex in V . A graph that contains a hamiltonian cycle is said to be hamiltonian; otherwise, it is nonhamiltonian.,(a) A graph representing the vertices, edges, and faces of a dodecahedron, with a hamiltonian cycle shown by shaded edges. (b) A bipartite graph with an odd number of vertices. Any such graph is nonhamiltonian.,6,NP-Completeness (verifiable),We can define the hamiltonian-cycle
4、 problem, “Does a graph G have a hamiltonian cycle?“ as a formal language: HAM-CYCLE = G : G is a hamiltonian graph.,7,NP-Completeness (verifiable),Consider a slightly easier problem. Suppose that a friend tells you that a given graph G is hamiltonian, and then offers to prove it by giving you the vertices in order along the hamiltonian cycle. It would certainly be easy enough to verify the proof: simply verify that the provided cycle is hamiltonian by checking whether it is a permutation of the
《算法导论课件第18讲NPCompleteness1章节》由会员E****分享,可在线阅读,更多相关《算法导论课件第18讲NPCompleteness1章节》请在金锄头文库上搜索。
逍遥游复习 知识点整理
近现代法德关系史 高三展示课3稿
当代大学生人生信仰及追求的调查研究
长相思 纳兰性德-ppt课件
课件:危机意识 一
英语ppt演讲关于阿甘正传
发达国家基础教育改革的动向与趋势 修改版
中国民间美术 课件.ppt
生物质发电技术与系统 课程ppt 第1章 生物质发电技术现状及发展趋势 2学时 -----2016
现代信号处理思考题 含答案
执业药师继续教育 抑郁症的药物治疗 100分
小学生的成长档案模板不用修改 万能型
增订六版 现代汉语 上册 第二章文字 思考与练习答案
国家财政ppt课件
加拿大英语介绍
六年级统计图的选择课件
中学生成长档案ppt
中国现代文学史期末复习整理
lohi和hihilo训练对女子赛艇运动员运动能力影响的比较研究
风雨贾平凹阅读答案
2024-04-11 25页
2024-04-11 37页
2024-04-11 28页
2024-04-11 31页
2024-04-11 36页
2024-04-11 29页
2024-04-11 22页
2024-04-11 27页
2024-04-11 34页
2024-04-11 32页