Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
aa:classes [2016/11/21 09:49] ccalin [Hardness with respect to a class] |
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)] |