旅行商问题

旅行商问题 (Travelling Salesman problem)

This problem can be stated as- "Given n number of cities and a travelling salesman has to visit each city. Then we have to find the shortest tour so that the travelling salesman can visit each and every city only once."

可以说这个问题是: “给n个城市,一个旅行推销员必须访问每个城市。然后我们必须找到最短的游览,以便旅行推销员只能访问每个城市一次。”

This travelling salesman problem is one of the examples of NP-Complete problems.

这个旅行推销员问题是NP-完全问题的例子之一。

In the travelling salesman problem, we are given a complete undirected graph G = (V, E) that has a non-negative integer cost c (u, v) associated with each edge (u, v) belongs to E and we must find a tour of G with minimum cost.

在旅行商问题中,我们得到一个完整的无向图G =(V,E) ,该图具有与每个边(u,v)相关的非负整数成本c(u,v) 属于E ,我们必须找到以最低的费用游览G。

Let C (A) denotes the total cost of the edges in the subset A is the subset E.

C(A)表示子集A中边缘的总成本为子集E。

Travelling Salesman problem

Practically, it is always cheapest to go directly from a place w, going by way of any intermediate stop V can’t be expensive. Or say, cutting out an intermediate stop never increase the cost. This can be formalized that the cost function c satisfies the triangle inequality, if for all vertices u, v, w £ V .

实际上,直接从位置w出发总是最便宜的,通过任何中间停靠点V都不会很昂贵。 或者说,切出一个中间停止点永远不会增加成本。 如果对所有顶点u,v,w£V ,成本函数c可以满足三角形不等式,则可以形式化。

C (u, w) <= c (u, v) + c (v, w)

C(u,w)<= c(u,v)+ c(v,w)

This triangle inequality is natural one, and is many application it is automatically satisfied. In this problem, our tour starts from an initial state and completes after returning to original state passing through all intermediate states.

这个三角形不等式是自然的,并且在许多应用中都可以自动满足。 在这个问题中,我们的游览从初始状态开始,并在经过所有中间状态回到原始状态后完成。

If the graph has n vertices, i.e., |V| = n, then the solution space S is given by S = { 1, π, 1, π: is a permutation of (2, 3, ..., n)}.

如果图具有n个顶点,即| V | = n ,则解空间SS = {1,π,1,π:是(2,3,...,n)}的排列给出

Then |S| = (n-1)!

然后| S | =(n-1)!

The size of S can be reduced by restricting S so that (1, i1,...i2,i(n-1), 1) belongs to S if and only if (ij, ij + 1) £ E, 0 <= j <= n-1, and i0 = in = 1.

可以通过限制S来减小S的大小,使得(1,i1,... i2,i(n-1),1)属于S,当且仅当(ij,ij + 1)£E,0 < = j <= n-1i0 = in = 1

State space tree for this problem, for n = 4 and initial and final states 1.

这个问题的状态空间树,对于n = 4以及初始状态和最终状态1

Travelling Salesman problem

翻译自: https://www.includehelp.com/algorithms/travelling-salesman-problem.aspx

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值