Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aa:classes [2016/11/18 13:26]
pdmatei created
aa:classes [2016/11/25 16:15] (current)
pdmatei
Line 74: Line 74:
  
 $proof $proof
-Suppose $math[f \in P]. Hence there exists a TM $math[M_f] which decides $math[f] in polynomial time $math[S_f(n)]. Since $math[f \leq_p f'], there exists a TM $math[T] which transforms the input of $math[f] into one of $math[f'], such that: $math[\forall w: f(w) = 1 \iff f'(T(w)) = 1]. Furthermore,​ the execution time of $math[T] is a polynomial function $math[S_T(n)]. We construct the Turing Machine $math[M^*] as follows:+Suppose $math[f \in P]. Hence there exists a TM $math[M_f] which decides $math[f] in polynomial time $math[S_f(n)]. Since $math[f' ​\leq_p f], there exists a TM $math[T] which transforms the input of $math[f'] into one of $math[f], such that: $math[\forall w: f'(w) = 1 \iff f(T(w)) = 1]. Furthermore,​ the execution time of $math[T] is a polynomial function $math[S_T(n)]. We construct the Turing Machine $math[M^*] as follows:
   * read the input $math[w]   * read the input $math[w]
   * compute $math[w'​ = T(w)]   * compute $math[w'​ = T(w)]
Line 92: Line 92:
 Note that the above proposition establishes an implication ($math[A \implies B]). We cannot practically benefit from this proposition unless we know $math[A] is true (which, as already said, has not been proved for any problem). Note that the above proposition establishes an implication ($math[A \implies B]). We cannot practically benefit from this proposition unless we know $math[A] is true (which, as already said, has not been proved for any problem).
  
-However, this proposition is still true, because it validates our intuition regarding the concept of **polynomial reduction** - it clearly reflects our intuition regarding **hardness**.+However, this proposition is still true, because it validates our intuition regarding the concept of **polynomial reduction** - it clearly ​ 
 +reflects our intuition regarding **hardness**.
  
 ==== Hardness with respect to a class ==== ==== Hardness with respect to a class ====
Line 131: Line 132:
 $def[Completeness w.r.t. a class] $def[Completeness w.r.t. a class]
 Let $math[f] be a problem and $math[X] be a complexity class among: $math[NP] and $math[EXPTIME]. We say $math[f] is **X-complete** iff: Let $math[f] be a problem and $math[X] be a complexity class among: $math[NP] and $math[EXPTIME]. We say $math[f] is **X-complete** iff:
-  * $math[f] is **NP-hard** +  * $math[f] is **X-hard** 
-  * $math[f \in NP]+  * $math[f \in X]
 $end $end
  
Line 162: Line 163:
  
 In what follows, we shall establish: In what follows, we shall establish:
-  * if there exist NP-hard and NP-complete problems+  *  
 +if there exist NP-hard and NP-complete problems
   * how to prove that a problem is NP-hard / NP-complete   * how to prove that a problem is NP-hard / NP-complete