题目
Figure 1 represents a network of roads between 10 cities, A, B, C, D, E, F, G, H, J and K. The number on each edge represents the length, in miles, of the corresponding road.
[The total weight of the network is 253]
One day, Mabintou wishes to travel from A to H. She wishes to minimise the distance she travels.
(a) Use Dijkstra’s algorithm to find the shortest path from A to H. State your path and its length.
On another day, Mabintou wishes to travel from F to K via A.
(b) Find a route of minimum length from F to K via A and state its length.
The roads between the cities need to be inspected. James must travel along each road at least once. He wishes to minimise the length of his inspection route. James will start his inspection route at A and finish at J.
(c) By considering the pairings of all relevant nodes, find the length of James’ route. State the arcs that will need to be traversed twice. You must make your method and working clear.
(d) State the number of times that James will pass through F.
It is now decided to start the inspection route at D. James must minimise the length of his route. He must travel along each road at least once but may finish at any vertex.
(e) State the vertex where the new inspection route will finish.
(f) Calculate the difference between the lengths of the two inspection routes.
题目中文翻译
图 1 表示十个城市 A、B、C、D、E、F、G、H、J 和 K 之间的道路网络。每条边上的数字表示对应道路的长度(单位:英里)。
[网络总权重为 253]
有一天,Mabintou 希望从 A 到 H。她希望最小化旅行距离。
(a) 使用 Dijkstra 算法找到从 A 到 H 的最短路径。写出路径及其长度。
另一天,Mabintou 希望经 A 从 F 到 K。
(b) 找到经 A 从 F 到 K 的最小长度路线并写出其长度。
城市之间的道路需要被检查。James 必须每条道路至少经过一次。他希望最小化检查路线的长度。James 将从 A 开始检查路线,在 J 结束。
(c) 通过考虑所有相关节点的配对,找到 James 路线的长度。写出需要经过两次的弧。必须清楚说明方法和计算过程。
(d) 写出 James 经过 F 的次数。
现在决定从 D 开始检查路线。James 必须最小化路线长度。他必须每条道路至少经过一次,但可以在任何顶点结束。
(e) 写出新检查路线将结束的顶点。
(f) 计算两条检查路线长度之间的差值。
解答
(a)
解法一
思路
展开
从 赋永久标号 0 开始,每次选择当前工作值最小的顶点成为下一个永久标号,并按该顶点更新所有相邻顶点。工作值必须按产生顺序保留;到 获得永久标号后,再沿产生最终值的前驱顶点反向追踪最短路径。
答题过程
展开
Applying Dijkstra’s algorithm from gives:
| Vertex | Order of permanent label | Working values | Final value |
|---|---|---|---|
Tracing back the final labels gives
Therefore the shortest path is
with length
(b)
解法一
思路
展开
“经 ”把路线分成 到 与 到 两段,两段分别取最短路线后相加。由于道路无方向,(a) 的标号也能帮助读取这些最短距离。
答题过程
展开
A shortest route from to is
with length
A shortest route from to is
with length
Hence a minimum route from to via is
and its length is
(c)
解法一
思路
展开
原网络的奇点是 。路线指定从 开始、在 结束,因此最终只有 应为奇点;把这两个端点与原奇点合并考虑,需要为 选择总距离最小的配对。四个顶点共有三种不同配对,必须全部比较。
答题过程
展开
The relevant vertices are and . The three possible pairings are:
| Pairing | Minimum added length |
|---|---|
The minimum pairing is therefore .
The shortest route from to is , and the shortest route from to is . Hence the arcs to be traversed twice are
The minimum inspection-route length is
(d)
解法一
思路
展开
在增广后的网络中, 原本连接六条边,而 (c) 又把 与 各重复一次,所以增广后 的度数是 8。路线并非从 开始或结束,因此每次经过 会使用一条进入边和一条离开边。
答题过程
展开
The augmented degree of is
Therefore the number of times James passes through is
(e)
解法一
思路
展开
新路线从偶点 开始,而原网络的奇点为 。若在奇点 结束,只需重复连接 的最短路线;该路线就是权重为 10 的边 ,新增长度最小。
答题过程
展开
To start at and finish at , only the shortest path between and needs to be repeated. This is the single edge , of length miles.
Hence the new inspection route should finish at
(f)
解法一
思路
展开
第一条检查路线的长度由 (c) 得到。第二条路线只需在网络总权重 253 上加上重复边 的长度 10,再计算两者之差。
答题过程
展开
The new route has length
Therefore the difference between the two route lengths is