0% found this document useful (0 votes)
196 views32 pages

Network Models

1. The document discusses several network optimization problems including the shortest path problem, minimum spanning tree problem, and maximum flow problem. 2. For the shortest path problem, it describes an algorithm to find the shortest path between an origin and destination node in a network by iteratively finding the next closest unsolved node. 3. It also provides an example application of finding the shortest path between two points in Seervada Park and the steps to solve it using the algorithm.

Uploaded by

Wesal Refat
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views32 pages

Network Models

1. The document discusses several network optimization problems including the shortest path problem, minimum spanning tree problem, and maximum flow problem. 2. For the shortest path problem, it describes an algorithm to find the shortest path between an origin and destination node in a network by iteratively finding the next closest unsolved node. 3. It also provides an example application of finding the shortest path between two points in Seervada Park and the steps to solve it using the algorithm.

Uploaded by

Wesal Refat
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 32

NM

THE SHORTEST-PATH PROBLEM:

Consider an undirected and connected network with two special nodes called the origin and the destination. Associated with each of the links (undirected arcs) is a nonnegative distance. The objective is to find the shortest path (the path with the minimum total distance) from the origin to the destination.

ALGORITHM FOR THE SHORTESTPATH PROBLEM


Objective of nth iteration: Find the nth nearest node to the origin (to be repeated for n 1, 2, . . . until the nth nearest node is the destination. Input for nth iteration: n 1 nearest nodes to the origin (solved for at the previous iterations), including their shortest path and distance from the origin. (These nodes, plus the origin, will be called solved nodes; the others are unsolved nodes.)

ALGORITHM FOR THE SHORTESTPATH PROBLEM (CONT)


Candidates for nth nearest node: Each solved node that is directly connected by a link to one or more unsolved nodes provides one candidate the unsolved node with the shortest connecting link. (Ties provide additional candidates.) Calculation of nth nearest node: For each such solved node and its candidate, add the distance between them and the distance of the shortest path from the origin to this solved node. The candidate with the smallest such total distance is the nth nearest node (ties provide additional solved nodes), and its shortest path is the one generating this distance.

APPLYING THIS ALGORITHM TO THE SEERVADA PARK SHORTEST-PATH PROBLEM

TABLE Applying the shortest-path algorithm to the Seervada Park problem


Solved Nodes Directly connected to unsolved Nodes n Closest Connected Unsolved Node Total Distance involoved Nth nearest Node Minimum Distance Last Connection

1 2,3 4

O O A A B C A B E D E

A C B

2 4 2+2=4

A C B

2 4 4

OA OC AB

D E E D D D
T T

2+7=9 4+3=7 4+4=8 2+7=9 4+4=8 7+1=8


8+5=13 7+7=14

BE

D D
T

8 8
13

BD ED
DT
5

APPLYING THIS ALGORITHM TO THE SEERVADA PARK SHORTEST-PATH PROBLEM(CONT)

Now let us relate these columns directly to the outline given for the algorithm. The input for nth iteration is provided by the fifth and sixth columns for the preceding iterations, where the solved nodes in the fifth column are then listed in the second column for the current iteration after deleting those that are no longer directly connected to unsolved nodes. The candidates for nth nearest node next are listed in the third column for the current iteration. The calculation of nth nearest node is performed in the fourth column, and the results are recorded in the last three columns for the current iteration.

APPLYING THIS ALGORITHM TO THE SEERVADA PARK SHORTEST-PATH PROBLEM(CONT)

After the work shown in Table is completed, the shortest path from the destination to the origin can be traced back through the last column of Table 9.2 as either T D E B A O or T D B A O. Therefore, the two alternates for the shortest path from the origin to the destination have been identified as O A B E D T and O A B D T, with a total distance of 13 miles on either path.

THE MINIMUM SPANNING TREE PROBLEM

The minimum spanning tree problem bears some similarities to the shortest-path problem:
In both cases, an undirected and connected network is being considered, where the given information includes some measure of the positive length (distance, cost, time, etc.) associated with each link. Both problems also involve choosing a set of links that have the shortest total length among all sets of links that satisfy a certain property:

For the shortest-path problem, this property is that the chosen links must provide a path between the origin and the destination. For the minimum spanning tree problem, the required property is that the chosen links must provide a path between each pair of nodes.

THE MINIMUM SPANNING TREE PROBLEM CAN BE SUMMARIZED AS FOLLOWS:


1. You are given the nodes of a network but not the links. Instead, you are given the potential links and the positive length for each if it is inserted into the network. (Alternative measures for the length of a link include distance, cost, and time.) 2. You wish to design the network by inserting enough links to satisfy the requirement that there be a path between every pair of nodes. 3. The objective is to satisfy this requirement in a way that minimizes the total length of the links inserted into the network.

A network with n nodes requires only (n 1) links to provide a path between each pairof nodes.

EXAMPLE OF A SPANNING TREE:

10

SOME APPLICATIONS:
Here is a list of some key types of applications of the minimum spanning tree problem: 1. Design of telecommunication networks (fiber-optic networks, computer networks, leased-line telephone networks, cable television networks, etc.) 2. Design of a lightly used transportation network to minimize the total cost of providing the links (rail lines, roads, etc.) 3. Design of a network of high-voltage electrical power transmission lines 4. Design of a network of wiring on electrical equipment (e.g., a digital computer system) to minimize the total length of the wire 5. Design of a network of pipelines to connect a number of locations

11

ALGORITHM FOR THE MINIMUM SPANNING TREE PROBLEM:


1. Select any node arbitrarily, and then connect it (i.e., add a link) to the nearest distinct node. 2. Identify the unconnected node that is closest to a connected node, and then connect these two nodes (i.e., add a link between them). Repeat this step until all nodes have been connected. 3. Tie breaking: Ties for the nearest distinct node (step 1) or the closest unconnected node (step 2) may be broken arbitrarily, and the algorithm must still yield an optimal solution. However, such ties are a signal that there may be (but need not be) multiple optimal solutions. All such optimal solutions can be identified by pursuing all ways of breaking ties to their conclusion.
12

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MINIMUM SPANNING TREE PROBLEM:

The Seervada Park management needs to determine under which roads telephone lines should be installed to connect all stations with a minimum total length of line.
Nodes and distances for the problem are summarized below, where the thin lines now represent potential links.

13

STEP BY STEP SOLUTION (1):

Arbitrarily select node O to start. The unconnected node closest to node O is node A. Connect node A to node O.

14

STEP BY STEP SOLUTION (2):

The unconnected node closest to either node O or node A is node B (closest to A). Connect node B to node A.

15

STEP BY STEP SOLUTION (3):

The unconnected node closest to node O, A, or B is node C (closest to B). Connect node C to node B.

16

STEP BY STEP SOLUTION (4):

The unconnected node closest to node O, A, B, or C is node E (closest to B). Connect node E to node B.

17

STEP BY STEP SOLUTION (4):

The unconnected node closest to node O, A, B, C, or E is node D (closest to E). Connect node D to node E.

18

STEP BY STEP SOLUTION (5):

The only remaining unconnected node is node T. It is closest to node D. Connect node T to node D.

All nodes are now connected, so this solution to the problem is the desired (optimal) one. The total length of the links is 14 miles.

19

THE MAXIMUM FLOW PROBLEM:

the maximum flow problem can be described as follows:


1. All flow through a directed and connected network originates at one node, called the source, and terminates at one other node, called the sink. (The source and sink in the Seervada Park problem are the park entrance at node O and the scenic wonder at node T, respectively.) see next figure 2. All the remaining nodes are transshipment nodes. (These are nodes A, B, C, D, and E in the Seervada Park problem.) 3. Flow through an arc is allowed only in the direction indicated by the arrowhead, where the maximum amount of flow is given by the capacity of that arc. At the source, all arcs point away from the node. At the sink, all arcs point into the node. 4. The objective is to maximize the total amount of flow from the source to the sink. This amount is measured in either of two equivalent ways, namely, either the amount leaving the source or the amount entering the sink.

20

THE MAXIMUM FLOW PROBLEM:

Seervada Park Maximum Flow Problem


21

SOME APPLICATIONS:

Here are some typical kinds of applications of the maximum flow problem. 1. Maximize the flow through a companys distribution network from its factories to its customers. 2. Maximize the flow through a companys supply network from its vendors to its factories. 3. Maximize the flow of oil through a system of pipelines. 4. Maximize the flow of water through a system of aqueducts. 5. Maximize the flow of vehicles through a transportation network.

22

AN ALGORITHM:
1. Identify an augmenting path by finding some directed path from the source to the sink in the residual network such that every arc on this path has strictly positive residual capacity. (If no augmenting path exists, the net flows already assigned constitute an optimal flow pattern.) 2. Identify the residual capacity c* of this augmenting path by finding the minimum of the residual capacities of the arcs on this path. Increase the flow in this path by c*. 3. Decrease by c* the residual capacity of each arc on this augmenting path. Increase by c* the residual capacity of each arc in the opposite direction on this augmenting path. Return to step 1.

23

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MAXIMUM FLOW PROBLEM

Starting with the initial residual network given we give the new residual network after each one or two iterations, where the total amount of flow from O to T achieved thus far is shown in boldface (next to nodes O and T).

24

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MAXIMUM FLOW PROBLEM(CONT)

Iteration 1: In the previous figure, one of several augmenting paths is O B E T, which has a residual capacity of min{7, 5, 6}=5. By assigning a flow of 5 to this path, the resulting residual network is

25

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MAXIMUM FLOW PROBLEM(CONT)

Iteration 2: Assign a flow of 3 to the augmenting path O A D T. The resulting residual network is

Iteration 3: Assign a flow of 1 to the augmenting path O A B D T.

26

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MAXIMUM FLOW PROBLEM(CONT)

Iteration 4: Assign a flow of 2 to the augmenting path O B D T. The resulting residual network is

Iteration 5: Assign a flow of 1 to the augmenting path O C E D T.


27

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MAXIMUM FLOW PROBLEM(CONT)

Iteration 6: Assign a flow of 1 to the augmenting path O C E T. The resulting residual network is

28

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MAXIMUM FLOW PROBLEM(CONT)

Iteration 7: Assign a flow of 1 to the augmenting path O C E B D T. The resulting residual network is

29

APPLYING THIS ALGORITHM TO THE SEERVADA PARK MAXIMUM FLOW PROBLEM(CONT)

There are no more augmenting paths, so the current flow pattern is optimal.

Optimal Solution For the Maximum Flow Problem


30

FINDING AN AUGMENTING PATH:

The most difficult part of this algorithm when large networks are involved is finding an augmenting path. This task may be simplified by the following systematic procedure:
Begin by determining all nodes that can be reached from the source along a single arc with strictly positive residual capacity. Then, for each of these nodes that were reached, determine all new nodes (those not yet reached) that can be reached from this node along an arc with strictly positive residual capacity. Repeat this successively with the new nodes as they are reached

The result will be the identification of a tree of all the nodes that can be reached from the source along a path with strictly positive residual flow capacity

31

FINDING AN AUGMENTING PATH (CONT):

The procedure is illustrated in next figure is for the residual network that results from iteration 6 in the preceding example.

32

You might also like