《算法设计与分析 Design and Analysis of Algorithms》课程PPT课件:Tutorial 10

CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin

Ou uTIne Decision, Search and Optimization Class p& class np Reductions NP-Completeness
Outline • Decision, Search and Optimization • Class P & Class NP • Reductions • NP-Completeness 2

Problems in Different Forms Decision Problem, the answer is simply"yES"or"NO Search Problem, find a solution satisfying some properties if one exists. else return it doesn't exist Optimization Problem, each solution has an associated value, find a solution with best value(min /max
Problems in Different Forms Decision Problem, the answer is simply “YES” or “NO” Search Problem, find a solution satisfying some properties if one exists, else return it doesn’t exist Optimization Problem, each solution has an associated value, find a solution with best value (min / max) 3

Three Forms of CLIQUE Usually, it's enough to consider Decision Problem Decision Problem in complexity theory Given a graph g and a number k, decide whether g has a clique of size≥k no harder than Search Problem Given a graph G and a number k, find a clique with size >k in g if one exists else return it doesn 't exist no harder than Optimization Problem Given a graph G, find a largest clique in G
Three Forms of CLIQUE Decision Problem Given a graph G and a number k, decide whether G has a clique of size ≥ k Search Problem Given a graph G and a number k, find a clique with size ≥ k in G if one exists, else return it doesn’t exist Optimization Problem Given a graph G, find a largest clique in G no harder than no harder than Usually, it’s enough to consider Decision Problem in complexity theory 4

Language and Decision Problem are Equivalent anguage A language L is just a subset of [0, 1 *, the set of all strings of bits ☆{0,13=Un≥00,1 Language to Decision Problem Given a bit string x, decide whetherxE L Decision Problem to language Given a Decision Problem Encode all the instances into bit strings The corresponding language contains all the strings of yES" instances
Language and Decision Problem are Equivalent Language A language 𝐿 is just a subset of 0,1 ∗ , the set of all strings of bits ❖ 0,1 ∗ = ڂ≤��0 0,1 𝑛 Language to Decision Problem • Given a bit string 𝑥, decide whether 𝑥 ∈ 𝐿 Decision Problem to Language • Given a Decision Problem • Encode all the instances into bit strings • The corresponding language contains all the strings of “YES” instances 5

Class p v.s. Class NP P stands for what? Polynomial! Class p: Problems solvable in deterministic polynomial time What about np? ☆ No Prob|em? 8 Not Polynomial (i.e. polynomial time unsolvable Nondeterministic Polynomial! Class Np: Problems solvable in nondeterministic polynomial time
Class P V.S. Class NP • P stands for what? Polynomial! • Class P: Problems solvable in deterministic polynomial time • What about NP? ❖ No Problem? ❖ Not Polynomial (i.e. polynomial time unsolvable)? Nondeterministic Polynomial ! • Class NP: Problems solvable in nondeterministic polynomial time 6

Deterministic/Nondeterministic Polynomial time? Where do these terms come from? They're based on different computation models Deterministic Turing Machine 4 Nondeterministic Turing Machine We will not talk about Turing Machine in this course Details of these computation models please refer to the following course A CSCI3130 (Formal Languages and Automata Theory)
Deterministic/Nondeterministic Polynomial time? • Where do these terms come from? • They’re based on different computation models ❖ Deterministic Turing Machine ❖ Nondeterministic Turing Machine • We will NOT talk about Turing Machine in this course • Details of these computation models, please refer to the following course ❖ CSCI3130 (Formal Languages and Automata Theory) 7

An Equivalent Definition of Class NP Class NP: Problems checkable or verifiable in polynomial time Verification: Given a"certificate"of a solution, we could verify that the certificate is correct, e. g 8 Certificate for sat would be an assignment 8 Certificate for hamiltonian Cycle would be a sequence of n vertices, V1, V2, .. ,Vn
An Equivalent Definition of Class NP Class NP: Problems checkable or verifiable in polynomial time Verification: ❖Given a “certificate” of a solution, we could verify that the certificate is correct, e.g. ❖Certificate for SAT would be an assignment ❖Certificate for Hamiltonian Cycle would be a sequence of n vertices, v1 , v2 , …, vn 8

Solvable v.s. Verifiable For a problem in p we have polynomial time algorithm to solve it For a problem in NP, we have polynomial time verification algorithm to verify a certificate
Solvable V.S. Verifiable • For a problem in P, we have polynomial time algorithm to solve it • For a problem in NP, we have polynomial time verification algorithm to verify a certificate 9

Reductions Reduction: a transformation between instance a of Problem a and instance p of problem b such that The transformation takes polynomial time polynomial in size of the input instance The answer for a is yES"if and only if the answer forβ is also"Es
Reductions Reduction: a transformation between instance α of Problem A and instance β of Problem B such that • The transformation takes polynomial time ❖ Polynomial in size of the input instance • The answer for α is “YES” if and only if the answer for β is also “YES” 10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 中国科学技术大学:《现代密码学理论与实践》课程教学资源(PPT课件讲稿)第1章 引言(主讲:苗付友).pptx
- 东南大学:《数据结构》课程教学资源(PPT课件讲稿)随机算法(主讲:方效林).pptx
- 动态内存分配器的实现(实验PPT讲稿).pptx
- Java面向对象程序设计:Java的接口(PPT讲稿).pptx
- 赣南师范大学:《计算机网络技术》课程教学资源(PPT课件讲稿)第十章 Internet概述.ppt
- 《编译原理》课程教学资源(PPT课件讲稿)第四章 语法分析——自上而下分析.ppt
- 《网络搜索和挖掘技术》课程教学资源(PPT讲稿)Lecture 1:Web Search Overview & Web Crawling.ppt
- 《程序设计语言》课程PPT教学课件(章节大纲).ppt
- 长春大学旅游学院:《计算机网络与网络安全》课程教学资源(PPT课件)第6章 计算机网络与网络安全.ppt
- JavaScript编程基础(JavaScript语法规则).ppt
- 《面向对象程序设计》课程PPT教学课件:第1章 Visual Basic概述(主讲:高慧).ppt
- 西安电子科技大学:Operating-System Structures(PPT讲稿).pptx
- 电子科技大学计算机学院:《现代密码学》课程PPT教学课件(密码学基础)第一章 引言.ppt
- 山东大学:《微机原理及单片机接口技术》课程教学资源(PPT课件讲稿)第九章 模数转换器与数模转换器.ppt
- 香港浸会大学:《Data Communications and Networking》课程教学资源(PPT讲稿)Chapter 10 Circuit Switching and Packet Switching.ppt
- 杭州电子科技大学:《计算机、互联网和万维网简介》教学资源(PPT课件)Chapter 01 C++ Programming Basics.ppt
- 《E-commerce 2014》电子商务(PPT讲稿)Chapter 5 E-commerce Security and Payment Systems.ppt
- 《WEB技术开发》教学资源(PPT讲稿)HTML AND CSS.ppt
- 《E-commerce 2014》电子商务(PPT讲稿)Chapter 12 B2B E-commerce:Supply Chain Management and Collaborative Commerce.ppt
- 清华大学出版社:《WEB技术开发》课程教学资源(PPT课件)第1章 WEB开发技术概述.ppt
- 《C程序设计》课程PPT电子教案:第一章 概述.ppt
- 南京大学:《嵌入式网络物理系统》课程教学资源(PPT讲稿)时光自动机 Timed Automata.ppt
- 《PowerPoint》课程PPT教学课件:第六章 使用PowerPoint创建演示文稿.ppt
- 香港科技大学:Web-log Mining:from Pages to Relations.ppt
- 中国科学技术大学计算机学院:《高级操作系统 Advanced Operating System》课程教学资源(PPT课件)第四章 分布式进程和处理机管理(分布式处理机分配算法).ppt
- 清华大学:ICCV 2015 RIDE:Reversal Invariant Descriptor Enhancement.pptx
- 中国人民大学:Similarity Measures in Deep Web Data Integration.ppt
- 《数据结构》课程教学资源:课程PPT教学课件:绪论(数据结构讨论的范畴、基本概念、算法和算法的量度).ppt
- 《计算机组装与维修》课程教学资源(PPT课件讲稿)第二章 计算机系统维护维修工具使用.ppt
- 东南大学计算机学院:《操作系统概念 OPERATING SYSTEM CONCEPTS》课程教学资源(PPT课件)Operating-System Structures.ppt
- 《数字图像处理 Digital Image Processing》课程教学资源(PPT课件讲稿)第2章 图像分析.ppt
- 《EDA技术》实用教程(PPT讲稿)第5章 QuartusII 应用向导.ppt
- 香港浸会大学:《Data Communications and Networking》课程教学资源(PPT讲稿)Chapter 4 Transmission Media.ppt
- 北京大学:《搜索引擎 Search Engines》课程教学资源(PPT讲稿)Evaluating Search Engines(Search Engines Information Retrieval in Practice).ppt
- 西安电子科技大学:《8086CPU 指令系统》课程教学资源(PPT课件讲稿,共五部分,王晓甜).pptx
- 北京师范大学网络教育:《计算机应用基础》课程教学资源(PPT讲稿)第8章 计算机安全、第9章 多媒体技术.pptx
- 沈阳理工大学:《Java程序设计基础》课程教学资源(PPT课件讲稿)第1章 创建Java开发环境.ppt
- 成都信息工程大学(成都信息工程学院):分层分流培养个性发展的计算机卓越工程师——专业课分层教学探索与实践.ppt
- 厦门大学计算机科学系:《大数据技术原理与应用》课程教学资源(PPT课件)第十章 数据可视化.ppt
- SIGCOMM 2002:New Directions in Traffic Measurement and Accounting.ppt