五、NP-complete 問題之近似解
NP-complete 問題既找不到可行的解法,而很大部分的 NP-complete 問題都在計算機語言,程式,電路設計,統計學,程式作業上有大用,因此只好退而求其次找一個可行的近似解。很可惜的是,所有的 NP-complete 問題雖在 NP 的層次上相聯,在近似解上往往各需不同的解法,這些解法多從直觀而來,我們在此舉二個例子。
- 例1
- 在第三節問題5,包裝問題中,若採取「能裝就裝」法,即現有的盒子若可以裝得下,就不用新盒子,則此法所需用之盒子數 k1 與最可能少的盒子數 k0 滿足 。
- 證明
- 今令 n 個物品之重為 w1,w2,…,wn 公斤,因每個盒子只可以裝1公斤,故
另一方面,「能裝就裝」法不可能有兩個以上的盒子同時少於 公斤,故
本例得證。
這個問題的結果是說,我們大約可以用「能裝就裝」法做得最好情形的一半好。 經過較複雜的證明,Johnson 在1974年證得,當 n 很大時,
- (i)
- ,且存在一種情形能產生。
- (ii)
也就是用「能裝就裝」法不會壞到 70% 以上,但可以壞到多用了 70% 的盒子。
售貨員旅行問題的一個直觀走法是先訪問最近那個尚未訪問過的城,稱為「先訪近城」法,以圖1為例,其走法為
Rosenkrantz 等在1977年證明這並不是一個很理想的走法,他們證出若各城間的距離滿足三角不等式 7 ,則「先訪近城」法所走之總程 D1 與最短路徑 D0 之關係為
且當 n 很大時,可以有一種情形使得
上式中之 [x] 表示大於 x 之最小整數,例如 [5]=5, [2.5]=3。 因 當 n 大時可以很大,故 D1 可與 D0 相差非常之大,但在同一篇論文之中,Rosenkrantz 等證明另一種複雜的「直觀」走法可以達到 之地步。
在上面的定理中,三角不等式的條件很重要,若城之距離無此關係存在時,Sahni 與Gonzalez 在1976年證得:若 NP,則不可能存在一個有限的 m,及一個 O(nk) 計算量的走法,能使其全程長 D1 在任何 n 時滿足
即上式中 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
发表评论