[算法笔记]NPC问题证明sample
前言
关于一些具体细节可以看我这篇博文NPC问题证明
一些概念
先问大家几个问题,帮助大家理解一些概念
- There exists a polynomial time reduction from 3SAT to Palindrome Checking. Assume that Palindrome Checking is a program that verifies if a given word is a palindrome or not.
Note: A palindrome is a word that reads the same forwards as well as backwards. For example,
“CS17071SC” is a palindrome, but “CS170” is not - There exists a polynomial time reduction from any NP hard problem to any other NP hard problem
- There exists a polynomial time reduction from Palindrome Checking to 3SAT
想一下这几个问题的答案,或者说他们在什么情况下是对的,什么情况下是错的。下面我们来揭晓答案
1.首先关于回文检测显然可以在多项式时间内确认,所以回文检测是NP的,3SAT是一个NPC问题。回归到NPC问题的定义,NPC问题是可以在多项式时间内将NP问题归约为的问题。这并不符合NPC问题的定义,显然无法保证。但是这在NP=P的时候是对的,因为NPC问题是NP问题,