Posted on Categories:Operations Research, 数学代写, 运筹学

# 数学代写|运筹学代写Operations Research代考|IMSE560 Shortest Path Problems

avatest™

## avatest™帮您通过考试

avatest™的各个学科专家已帮了学生顺利通过达上千场考试。我们保证您快速准时完成各时长和类型的考试，包括in class、take home、online、proctor。写手整理各样的资源来或按照您学校的资料教您，创造模拟试题，提供所有的问题例子，以保证您在真实考试中取得的通过率是85%以上。如果您有即将到来的每周、季考、期中或期末考试，我们都能帮助您！

•最快12小时交付

•200+ 英语母语导师

•70分以下全额退款

## 数学代写|运筹学代写Operations Research代考|Shortest Path Problems

Similar to the maximal flow problem discussed in the previous section, shortest path problems are easily described. Given a network with a prespecified source and sink node as well as arc values $c_{i j}$ that denote the cost (or distance, fuel, or any other disutility) of traveling from node $n_i$ directly to node $n_j$ along arc $a_{i j}$, the task is to find the shortest path from the source to the sink. The literature typically distinguishes between one-to-one shortest path problems (those that search the shortest path between source and sink), one-to-all shortest path problems (in which the task is to find the shortest paths between the source and all other nodes in the network), and the all-to-all shortest path problems (where the task is to determine the shortest paths between all pairs of nodes). Clearly, it would be possible-albeit inefficient-to use an algorithm for the one-to-one shortest path problem and apply it repeatedly so as to solve the one-to-all and all-to-all shortest path problems.

This section first describes a way to reformulate the one-to-one shortest path problem, so that it fits into the mold of the cost-min feasible flow problem. It then describes the workings of an all-to-all shortest path algorithm that is not only very efficient, but also needed in areas such as location models, where all shortest paths have to be known before any location algorithm can even start.

First, we will discuss how to reformulate a shortest path problem as a costminimizing flow problem. The idea is to force one flow unit through the network, and let the optimizer find the cost-minimal, i.e., shortest, path. This is done by having lower bounds of zero and upper bounds of one for all arcs, coupled with the actual costs or distances specified for all arcs. So far, the optimal solution would be the zero flow, as it is feasible, and no cheaper solution can exist (at least not as long as the arc distances are nonnegative). We then add the circulatory arc $\left(n_t, n_s\right)$ with lower and upper bound equal to one. This forces a single unit through the network and will result in the desired solution. As an example, the graph transformation is shown in Fig. 6.16, where Fig. 6.16a shows the original graph with the distances or costs next to the arcs, while Fig. 6.16b has the lower bounds, the upper bounds, and the cost/ distances at the arcs.

As far as the mathematical formulation is concerned, we can use the usual min-cost objective function, coupled with two sets of constraints. The first single constraint ensures that exactly one unit leaves the source. The second set of constraints contains the usual conservation equations, which ensure that the flow unit that leaves the source has only one place to go: the sink. In the example of Fig. 6.16, the formulation would be as follows:
\begin{aligned} \mathrm{P}: & \operatorname{Min} z=3 x_{s 1}+7 x_{s 2}+5 x_{13}+2 x_{12}+2 x_{23}+1 x_{3 t}+4 x_{2 t} \ & \text { s.t. } x_{s 1}+x_{s 2}=1 \ & x_{s 1}-x_{12}-x_{13}=0 \ & x_{s 2}+x_{12}-x_{23}-x_{2 t}=0 \ & x_{13}+x_{23}-x_{3 t}=0 \ & x_{i j} \geq 0 \text { for all } i, j \end{aligned}

## 数学代写|运筹学代写Operations Research代考|Spanning Tree Problems

Similar to the models in the previous sections in this chapter, the problem behind spanning trees is easily explained. Suppose there is an undirected graph that includes the potential edges that connect the nodes of the graph. The values associated with the edges indicate their costs. The problem is now to choose some of the edges and include them in the solution, so that the total costs are minimized, while the network remains connected. This may result in a graph, in which the path from one node to another leads through many intermediate nodes.

It is apparent that what we are looking for a tree, as any graph with fewer edges than a tree has will no longer be connected, while any graph that has more edges than a tree will include at least one cycle, which is unnecessary.

Problems of this nature occur whenever it is very expensive to establish edges. Typical examples are road networks, networks of power lines, or networks of sewer tunnels. The example shown in Fig. $6.21$ shows all possible connections that may be established, coupled with their respective costs.

The task is now to find a subset of existing edges (the edges that belong to connections that will actually be built), so as to minimize the total amount of money necessary to connect all nodes with each other. The resulting connected subgraph of the original graph with $n$ nodes is a minimal spanning tree of the given graph. Given that the result will be a tree, one can show that the optimal solution will include exactly $(n-1)$ edges.

## 数学代写|运筹学代写Operations Research代考|Shortest Path Problems

P :Min $z=3 x_{s 1}+7 x_{s 2}+5 x_{13}+2 x_{12}+2 x_{23}+1 x_{3 t}+4 x_{2 t} \quad$ s.t. $x_{s 1}+x_{s 2}=1 x_{s 1}-x_{12}-x_{13}=0 \quad x_{s 2}+x_{12}-x_{23}-x_{2 t}=0 x_{13}+x_{23}-x_{3 t}=$

## 数学代写|运筹学代写Operations Research代考|Spanning Tree Problems

$6.21$ 显示所有可能建立的连接，以及它们各自的成本。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。