2007年5月22日星期二

未來數學家的挑戰【五、NP-complete 問題之近似解】

http://episte.math.ntu.edu.tw/articles/mm/mm_10_2_04/page5.html
五、NP-complete 問題之近似解

NP-complete 問題既找不到可行的解法,而很大部分的 NP-complete 問題都在計算機語言,程式,電路設計,統計學,程式作業上有大用,因此只好退而求其次找一個可行的近似解。很可惜的是,所有的 NP-complete 問題雖在 NP 的層次上相聯,在近似解上往往各需不同的解法,這些解法多從直觀而來,我們在此舉二個例子。


例1
在第三節問題5,包裝問題中,若採取「能裝就裝」法,即現有的盒子若可以裝得下,就不用新盒子,則此法所需用之盒子數 k1 與最可能少的盒子數 k0 滿足 $k_1\leq 2k_0+1$

證明
今令 n 個物品之重為 w1,w2,…,wn 公斤,因每個盒子只可以裝1公斤,故
\begin{displaymath} k_0\geq \sum_{i=1}^{n}{w_i} \end{displaymath}

另一方面,「能裝就裝」法不可能有兩個以上的盒子同時少於 $\frac{1}{2}$ 公斤,故
\begin{displaymath} k_1\leq 2\sum_{i=1}^{n}{w_i}+1 \end{displaymath}

本例得證。

這個問題的結果是說,我們大約可以用「能裝就裝」法做得最好情形的一半好。 經過較複雜的證明,Johnson 在1974年證得,當 n 很大時,

(i)
$k_1\leq \frac{17}{10} k_0+2$,且存在一種情形能產生。

(ii)
$k_1\geq \frac{17}{10} (k_0-1)$

也就是用「能裝就裝」法不會壞到 70% 以上,但可以壞到多用了 70% 的盒子。

售貨員旅行問題的一個直觀走法是先訪問最近那個尚未訪問過的城,稱為「先訪近城」法,以圖1為例,其走法為

\begin{displaymath} A\rightarrow G\rightarrow C\rightarrow B\rightarrow D\rightarrow F\rightarrow E\rightarrow A \end{displaymath}

Rosenkrantz 等在1977年證明這並不是一個很理想的走法,他們證出若各城間的距離滿足三角不等式 7 ,則「先訪近城」法所走之總程 D1 與最短路徑 D0 之關係為
\begin{displaymath} D_1\leq \frac{1}{2}([\log_2n]+1)D_0 \end{displaymath}

且當 n 很大時,可以有一種情形使得
\begin{displaymath} D_1\geq \frac{1}{3}(\log_2n+\frac{4}{3})D_0 \end{displaymath}

上式中之 [x] 表示大於 x 之最小整數,例如 [5]=5, [2.5]=3。 因 $\log_2n$n 大時可以很大,故 D1 可與 D0 相差非常之大,但在同一篇論文之中,Rosenkrantz 等證明另一種複雜的「直觀」走法可以達到 $D_1\leq 2D_0$ 之地步。

在上面的定理中,三角不等式的條件很重要,若城之距離無此關係存在時,Sahni 與Gonzalez 在1976年證得:若 $P\neq$NP,則不可能存在一個有限的 m,及一個 O(nk) 計算量的走法,能使其全程長 D1 在任何 n 時滿足

\begin{displaymath} D_1\leq mD_0 \end{displaymath}

即上式中 m 非等於無限大不可,亦即所有 O(nk) 的做法都不很好。

13 条评论:

匿名 说...

Good day I am so glad I found your webpage, I really found you by error, while I was
searching on Aol for something else, Anyhow I am here now and
would just like to say thank you for a incredible post and a
all round thrilling blog (I also love the theme/design), I don’t have time to browse it all at the minute but I have bookmarked
it and also added your RSS feeds, so when I have time I will be back to read a great deal more, Please do keep up the great b.
Here is my weblog : us casinos microgaming

匿名 说...

Thanks for the auspicious writeup. It actually was a enjoyment account
it. Look complex to far brought agreeable from you!
By the way, how can we keep up a correspondence?
My page :: gokkasten zoeken

匿名 说...

Yes! Finally someone writes about 100 free spins.
My blog post : no deposit free spins slots

匿名 说...

First off I want to say wonderful blog! I had a quick
question which I'd like to ask if you do not mind. I was curious to find out how you center yourself and clear your head prior to writing. I've had
a difficult time clearing my mind in getting my thoughts out
there. I do enjoy writing however it just seems like the first 10 to
15 minutes tend to be wasted just trying to figure out how to begin.

Any recommendations or hints? Cheers!
Also see my website :: no deposit casio free spins

匿名 说...

I visited many sites except the audio feature for audio songs current at this web
page is actually superb.
Feel free to visit my web-site : freespinsnodeposit.blogspot.com

匿名 说...

Thankfulness to my father who shared with me on the topic of this webpage,
this web site is truly awesome.
Here is my site ... nieuwe gokkasten

匿名 说...

An intriguing discussion is definitely worth comment.

I do believe that you should write more about this issue, it may
not be a taboo subject but usually people do not discuss such issues.
To the next! Kind regards!!
My webpage ; new netent casinos

匿名 说...

Hey very interesting blog!
Look into my web page : online casino ohne einzahlung

匿名 说...

May I simply say what a relief to find somebody that truly understands what they are talking about online.
You definitely realize how to bring a problem to light
and make it important. More and more people need to check
this out and understand this side of the story.
I was surprised you're not more popular because you definitely possess the gift.
My homepage no Deposit poker Bonus Codes

匿名 说...

I'm truly enjoying the design and layout of your site. It's a
very easy on the eyes which makes it much more pleasant
for me to come here and visit more often. Did you hire out a developer to create your theme?

Great work!
My blog post ; playtech casino bonuses

匿名 说...

That is very attention-grabbing, You are an overly professional blogger.
I've joined your feed and look ahead to seeking more of your great post. Also, I have shared your site in my social networks
Here is my weblog : no deposit casino blog cirrus casino

匿名 说...

Your style is very unique compared to other folks I have read stuff
from. Many thanks for posting when you have the opportunity, Guess I
will just book mark this page.
Also visit my web site ; online casino no deposit bonus

匿名 说...

If some one wants to be updated with hottest technologies
then he must be go to see this website and be up to date every day.
Feel free to surf my web page ... netent kasinot