寻找最短路径 [英] Finding Shortest Path
本文介绍了寻找最短路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想找到从起点到终点的最短路径。
示例:
如果任何起点有两条路线到达目的地点。
类似:A-> B-> C-> D-> E
A-> C-> E
这里A必须要去E.所以我想找到ASP中的最短路径算法代码,可以找到从A到E的最短路径。
解决方案
这个问题众所周知,你可能会开始阅读这个维基百科页面:最短路径问题 [ ^ ]。
Google是你的朋友:好好去看看他经常。他可以比在这里发布问题更快地回答问题...
我认为你所寻找的是旅行推销员问题而且还有一些问题这里有非常好的解释: Google:推销员问题 [ ^ ]
I want to find the shortest path from starting point to end point.
Example:
If Any starting point is having two route to reach to destination point.
Like: A->B->C->D->E
A->C->E
Here A is having to way to go to E. So i want to find shortest path algorithm code in ASP that can find shortest path from A to E.
解决方案
Such problem is well known, you might start reading this Wikipedia page: Shortest path problem[^].
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
I think what you are looking for is called "The Travelling Salesman problem" and there are some very good explanations of it here: Google: salesman problem[^]
这篇关于寻找最短路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文