Seperti yang sudah dinyatakan dalam komentar, itu tergantung pada definisi, seperti biasa. Upaya saya untuk menjawab ini membutuhkan beberapa definisi, jadi ini akan menjadi contoh lain dari ketidakmampuan saya untuk memberikan jawaban yang ringkas.
Definisi: Sebuah masalah optimasi adalah tuple ( X , F , Z , ⊙ ) dengan(X,F,Z,⊙)
- X setinstance(input) yang dikodekan (string)atauinput.X
- F adalah fungsi yang memetakan setiap contoh x ∈ X untuk satu set F ( x ) darisolusi layakdari x .Fx∈XF(x)x
- Z adalah fungsi tujuan yang memetakan setiap pasangan ( x , y ) , dimana x ∈ X dan y ∈ F ( x ) , untuk bilangan real Z ( x , y ) disebutnilaidari y .Z(x,y)x∈Xy∈F(x)Z(x,y)y
- ⊙ adalaharah optimasi, baik min atau maks .⊙minmax
Definisi: Sebuah solusi yang optimal dari sebuah contoh x ∈ X dari masalah optimasi P O adalah solusi yang layak y ∈ F ( x ) yang Z ( x , y ) = ⊙ { Z ( x , y ' ) | y ' ∈ F ( x ) } . Nilai solusi optimal dilambangkan dengan O p t ( x )x∈XPOy∈F(x)Z(x,y)=⊙{Z(x,y′)∣y′∈F(x)}Opt(x)dan disebut optimal .
Definisi: The masalah evaluasi , dilambangkan P E , sesuai dengan masalah optimasi P O adalah sebagai berikut: Mengingat contoh x ∈ X , menghitung O p t ( x ) jika x memiliki solusi yang optimal dan output “tidak ada solusi optimal” sebaliknya.PEPOx∈XOpt(x)x
Perhatikan bahwa ini hanya meminta nilai solusi optimal bukan seluruh solusi itu sendiri dengan semua perinciannya.
Definisi: Masalah keputusan , dilambangkan P D terkait dengan masalah optimisasi P O adalah sebagai berikut: Diberikan pasangan ( x , k ) , di mana x ∈ X dan k ∈ Q , putuskan apakah x memiliki solusi yang layak y sedemikian rupa sehingga Z ( x , y ) ≤ k jika ⊙ = min dan sedemikian rupa sehingga Z ( x , y )PDPO(x,k)x∈Xk∈QxyZ(x,y)≤k⊙=min≥kZ(x,y)≥k if ⊙=max⊙=max.
A first observation is now that PO∈NPO⇒PD∈NPPO∈NPO⇒PD∈NP. The proof is not difficult and omitted here.
Now intuitively PEPE and PDPD corresponding to POPO are not more difficult than POPO itself. To express this feeling formally (thereby defining what equivalent is supposed to mean) we will use reductions.
Recall that a language L1L1 is polynomial-time reducible to another language L2L2 if there is a function ff, computable in polynomial time, such that for all words xx, x∈L1⇔f(x)∈L2x∈L1⇔f(x)∈L2. This kind of reducibility is known as Karp or many-to-one reducibility, and if L1L1 is reducible to L2L2 in this manner, we express this by writing L1≤mL2L1≤mL2. This is a central concept in the definition of NP-completness.
Unfortunately, many-to-one reductions go between languages and it is not clear how to employ them in the context of optimization problems. Therefore we need to consider a different kind of reducibility, Turing reducibility. First we need this:
Definition: An oracle for a problem PP is a (hypothetical) subroutine that can solve instances of PP in constant time.
Definition: A problem P1P1 is polynomial-time Turing-reducible to a problem P2P2, written P1≤TP2P1≤TP2, if instances of P1P1 can be solved in polynomial time by an algorithm with access to an oracle for P2P2.
Informally, just as with ≤m≤m, the relation P1≤TP2P1≤TP2 expresses, that P1P1 is no more difficult than P2P2. It is also easy to see that if P2P2 can be solved in polynomial time, so can P1P1. Again ≤T≤T is a transitive relation. The following fact is obvious:
Let PO∈NPOPO∈NPO, then PD≤TPE≤TPOPD≤TPE≤TPO.
Because given the full solution, computing its value and deciding whether it meets the bound kk is simple.
Definition: If for two problems P1P1 and P2P2 both relations P1≤TP2P1≤TP2, P2≤P1P2≤P1 hold, we write P1≡TP2P1≡TP2; our notion of equivalence.
We are now ready to proof that PD≡TPEPD≡TPE given the corresponding optimization problem is PO∈NPOPO∈NPO and ZZ is integer valued. We have to show that PE≤TPDPE≤TPD holds. We can determine ⊙{Z(x,y)∣y∈F(x)}⊙{Z(x,y)∣y∈F(x)} with a binary search usign the orcale for PDPD. The definition of NPONPO ensures that |Z(x,y)|≤2q(|x|)|Z(x,y)|≤2q(|x|) for some polynomial qq, so the number of steps in the binary search is polynomial in |x||x|. ◻□
For an optimization problem POPO the relation to PEPE is less clear. In many concrete cases, one can show directly that PD≡TPE≡TPOPD≡TPE≡TPO. To prove that this holds generally within the framework given here we need an additional assumption.
First we need to extend ≤m≤m from pairs of languages to pairs of the corresponding decision problems. Then it is easy to see that ≤T≤T is more general than ≤m≤m.
Let PP and P′P′ be decision problems; then P≤mP′⇒P≤TP′P≤mP′⇒P≤TP′. This holds because a many-to-one reduction can be interpreted as making use of an oracle in a very restricted way: The oracle is called once, at the very end, and its result is also returned as the overall result. ◻□
Now we are ready for the finale:
Let PO∈NPOPO∈NPO and suppose ZZ is integer-valued and that PDPD is NP-complete, then PD≡TPE≡TPO.
PD≡TPE≡TPO.
With the previous observations it remains to show
PO≤TPEPO≤TPE. To do this we will exhibit a problem
P′O∈NPOP′O∈NPO such that
PO≤TP′EPO≤TP′E. Then we have
PO≤TP′E≤TP′D≤TPD≤TPE.PO≤TP′E≤TP′D≤TPD≤TPE.
The second and third
≤T≤T hold because of the equivalence of the decision and evaluation version proofed earlier. The third
≤T≤T follows from the NP-completness of
PDPD and the two facts mentioned before, namely
PO∈NPO⇒PD∈NPPO∈NPO⇒PD∈NP and
P≤mP′O⇒P≤TP′OP≤mP′O⇒P≤TP′O.
Now the details: Assume that the feasible solutions of POPO are encoded using an alphabet ΣΣ equipped with a total order. Let w0,w1,…w0,w1,… be the words from Σ∗Σ∗ listed in order of nondecreasing length and lexicographic order within the blocks of words with common length. (Thus w0w0 is the empty word.) For all y∈Σ∗y∈Σ∗ let σ(y)σ(y) denote the unique integer ii such that y=wiy=wi. Both σσ and σ−1σ−1 can be computed in polynomial time. Let q be a polynomial such that for all x∈X and all y∈F(x) we have σ(y)<2q(|x|).
Now the problem P′O is identical to PO except for a modified objective function Z′. For x∈X and y∈F(x) we take Z′(x,y)=2q(|x|)⋅Z(x,y)+σ(y). Z′ is computable in polynomial time thus P′O∈NPO.
To show that PO≤TP′E we observe that x is feasible for PO if and only if it is feasible for P′E. We can assume that this is the case, since the opposite case is trivial to handle.
The substituion of Z′ for Z is monotonic in the sense that for all y1,y2∈F(x), if Z(x,y1)<Z(x,y2) then Z′(x,y1)<Z′(x,y2). This implies that every optimal solution for x in P′O is an optimal solution of x in PO. Thus our task reduces to the computation of an optimal solution y of x in P′O.
Querying the oracle for P′E we can get the value of Z′(x,y)=2q(|x|)⋅Z(x,y)+σ(y). Forming the remainder of this number modulo 2q(|x|) yields σ(y) from which y can be computed in polynomial time.