这个和perl 没啥关系

完全是算法问题, 想好了  只是 用perl写出来而已

有个书叫 Algorithm perl   讲算法多些,  比如数据结构,链表等



2010/7/24 jack black <[email protected]>

> algorithm for solving TSPs [Example ]
> http://blog.csdn.net/jiuyizhizhu/archive/2010/04/06/5454724.aspx
>
>
>
>
> 在 2010年7月23日 下午11:31,PIG <[email protected]> 写道:
>  > 这个题有点问题啊,旅游区要走的路是修好的,山坡上只有羊儿在吃草。。
> >
> > 在 2010年7月23日 下午11:27,Xiaojun Deng <[email protected]> 写道:
> >> 这个是NP难题,只能求最优解吧。除非你用穷举,但时间复杂度是O(n!)
> >> 简单的可以用贪婪法解,就是找最近的点,然后去那个点,再找离他最近的点,直到所有的点
> >> 都被找完。
> >>
> >> 2010/7/23 一杯白开水 <[email protected]>
> >>>
> >>> 有没有代码可供参考啊?头都想大了,代码不知道如何写了?
> >>>
> >>>
> >>> ------------------ 原始邮件 ------------------
> >>> 发件人: "Xiaojun Deng"<[email protected]>;
> >>> 发送时间: 2010年7月23日(星期五) 晚上11:09
> >>> 收件人: "perlchina"<[email protected]>;
> >>> 主题: Re: [PerlChina] 最近距离算法
> >>>
> >>> 这是TSP货郎担问题吧,NP难题啊,用动态规划求最优解吧
> >>>
> >>> 2010/7/21 一杯白开水 <[email protected]>
> >>>>
> >>>>          从A点开车去旅游,需要游完图中所有的旅游景点,怎样计算最近的距离,perl算法应该怎样写呢?
> >>>>
> >>>>
> >>>> --
> >>>> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> >>>> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
> >>>> 要取消订阅此网上论坛,请发送电子邮件至 
> >>>> [email protected]<perlchina%[email protected]>
> 。
> >>>> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
> >>>
> >>> --
> >>> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> >>> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
> >>> 要取消订阅此网上论坛,请发送电子邮件至 
> >>> [email protected]<perlchina%[email protected]>
> 。
> >>> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
> >>>
> >>> --
> >>> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> >>> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
> >>> 要取消订阅此网上论坛,请发送电子邮件至 
> >>> [email protected]<perlchina%[email protected]>
> 。
> >>> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
> >>
> >> --
> >> 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> >> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
> >> 要取消订阅此网上论坛,请发送电子邮件至 
> >> [email protected]<perlchina%[email protected]>
> 。
> >> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
> >>
> >>
> >
> > --
> > 您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> > 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
> > 要取消订阅此网上论坛,请发送电子邮件至 
> > [email protected]<perlchina%[email protected]>
> 。
> > 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
> >
> >
>
> --
>  您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
> 要向此网上论坛发帖,请发送电子邮件至 [email protected]。
> 要取消订阅此网上论坛,请发送电子邮件至 
> [email protected]<perlchina%[email protected]>
> 。
> 若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
>
>


-- 
            Yours Sincerely
                    Zeng Hong

-- 
您收到此邮件是因为您订阅了 Google 网上论坛的“PerlChina Mongers 讨论组”论坛。
要向此网上论坛发帖,请发送电子邮件至 [email protected]。
要取消订阅此网上论坛,请发送电子邮件至 [email protected]。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。

回复