题目
Figure 3 represents a network of roads. The number on each arc represents the time taken, in minutes, to drive along the corresponding road.
[The total weight of the network is ]
Malcolm wishes to minimise the time spent driving from his home at A to his office at H. The delays from roadworks on two of the roads leading in to H vary daily, and so the time taken to drive along these roads is expressed in terms of , where is fixed for any given day and .
(a) Use Dijkstra’s algorithm to find the possible routes that minimise the driving time from A to H. State the length of each route, leaving your answer in terms of where necessary.
On Monday, Malcolm needs to check each road. He must travel along each road at least once. He must start and finish at H and minimise the total time taken for his inspection route.
Malcolm finds that his minimum duration inspection route requires him to traverse exactly four roads twice and the total time it takes to complete his inspection route is 307 minutes.
(b) Calculate the minimum time taken for Malcolm to travel from A to H on Monday. You must make your method and working clear.
题目中文翻译
图 3 表示一个道路网络。每条弧上的数字表示沿对应道路行驶所需的时间(单位:分钟)。
[网络总权重为 ]
Malcolm 希望最小化从家 A 到办公室 H 的驾驶时间。通往 H 的两条道路上的道路工程延误每天不同,因此沿这些道路行驶的时间用 表示,其中 在任何给定日期是固定的且 。
(a) 使用 Dijkstra 算法找到最小化从 A 到 H 驾驶时间的可能路线。写出每条路线的长度,必要时保留 的表达式。
周一,Malcolm 需要检查每条道路。他必须每条道路至少经过一次。他必须从 H 开始并结束,并最小化检查路线所需的总时间。
Malcolm 发现他的最小持续时间检查路线要求他恰好四条道路经过两次,完成检查路线的总时间为 307 分钟。
(b) 计算 Malcolm 周一从 A 到 H 所需的最短时间。必须清楚说明方法和计算过程。
解答
(a)
解法一
思路
展开
先对不含 的部分执行 Dijkstra 算法,严格按产生顺序保留每个工作值。由于进入 的三条边分别来自 ,而其中两条权重含 ,不能在不知道 时确定唯一永久标号;因此分别由 的最终值计算到达 的三个候选值,并反向追踪相应路线。
答题过程
展开
Applying Dijkstra’s algorithm from gives:
| Vertex | Order of permanent label | Working values | Final value |
|---|---|---|---|
The three possible working values at are obtained through , and .
Via :
giving the route
Via :
giving the route
Via :
giving the route
Thus the minimum driving time for a given positive is the least of
(b)
解法一
思路
展开
原网络只有 是奇点。要从 出发并回到 完成闭合路线,必须把一条 到 的最短路径重复。题目说明恰好四条道路被重复,因此三条候选路线中只能选择含四条边的 ;将其长度加到网络总权重并令总和为 307,即可求出周一的 。
答题过程
展开
The only odd vertices in the original network are and . Therefore a minimum closed inspection route must repeat a shortest path from to .
Exactly four roads are traversed twice, so the repeated path is
whose length is .
The total inspection time is therefore
Hence
so
For this value of , the three possible journey times from part (a) are
Therefore the minimum time taken from to on Monday is