GRPH: network of NS (or VRTIS) and RS (or GS) joining the nodes with eah other IGRPH: graph where the ars have an RINTTIN (or IRTIN). a Graph a igraph d e d HIN etween two nodes is a sequene of ars where every ar has exatly one node in ommon with the previous ar a d HIN: a d; RS: a,, d PTH is a hain of direted ars, where the terminal node of eah ar is the initial node of the sueeding ar: a d PTH: a d; RS: a,, d 0, Jayant Rajgopal
a d a d graph is said to e NNT if there is a ontinuous hain of edges joining any two verties. graph is STRNGLY NNT if for all ordered pairs of verties (i,j) there is a path of ars from i to j. graph is MPLT if every node is diretly onneted to every other node. TR is a onneted graph with no yles. SPNNING TR is a tree that ontains all the nodes of a graph. a d Graph e a d a d e Spanning Tree 0, Jayant Rajgopal
GIVN: digraph G with a set of nodes,,,m, and a set of n direted ars i j emanating from node i and ending in node j, with eah node i, a numer i that is the supply (if i >0) or the demand (if i <0); if i =0, then the node is alled a transshipment node, with eah ar i j, a flow of x ij and a unit transportation / movement ost of ij. SSUMPTIN: i=..m i = 0 PRLM MN: Minimize all defined i j ( ij x ij ) st j x ij k x ki = i for i=,,,m L ij x ij U ij for all i j The oeffiient matrix for the onstraints is alled the N R ININ matrix. 0, Jayant Rajgopal
Network low Prolems Prototypial xample new amusement park is eing onstruted y a large orporation. ars are not allowed into the park, ut there is a system of narrow, winding pathways for automated people movers and pedestrians. The road system is shown in the figure elow, where represents the entrane to the park and - represent sites of various popular amusements. The numers aove the ars give the distanes of the ars. The designers fae three questions:. letrial lines must e laid under the pathways to estalish ommuniation etween all nodes in the network. Sine this is an expensive proess, the question to e answered is how this an e aomplished with a minimum total distane?. Loation is extremely popular with visitors, and it is planned that a small numer of people movers will run diretly from the entrane to site. The question is whih path will provide the smallest total distane from to?. uring the peak season the numer of people wanting to go from to is very large. Thus during this time various routes may e followed from to (irrespetive of distane) so as to aommodate the inreased demand through additional trips. However, due to the terrain and the quality of the onstrution, there are limits on the numer of people mover trips that an run on any given path per day; these are different for different paths. The question is how to route various trips to maximize the numer of trips that an e made per day without violating the limits on any individual path? Question may e answered y solving a minimum spanning tree prolem. Question may e answered y solving a shortest path prolem. Question may e answered y solving a maximum flow prolem. 0, Jayant Rajgopal
IJKSTR'S SHRTST PTH LGRITHM Let us represent the origin y, and suppose that there are n additional nodes in the network: jetive at Iteration i: To find the ith losest node from, along with the orresponding path and distane. Input at Iteration i: The losest, the nd losest,...,(i-)th losest nodes to, along with their paths and distanes. These are designated as permanent nodes (P) while the remaining nodes are designated as temporary nodes (T). Initially, P={} and T={all other nodes}. t Iteration i: etermine all nodes in T that are diretly linked to at least one node in P all this suset of T as Ω. or eah j Ω, ompute j = Minimum{distane of diret link from j to a permanent node + shortest distane from to that permanent node}. etermine the j Ω that has the minimum value for j. Remove j from T and add it to P along with the shortest path and distane. t the end of iteration i the shortest path to eah node is availale. xample: Iteration P={}, =0; T={,,,,,} Ω = {,, } =Min{ +L }= =Min{ +L }= =Min{ +L }= losest node = {}, = 0, Jayant Rajgopal
Iteration P={,}, =0, =; T={,,,,} Ω = {,, } =Min{ +L, +L }= =Min{0+, +} = =Min{ +L }=0+= =Min{ +L }=+=9 (reaking the tie aritrarily ) Iteration nd losest node = {}, = P={,,}, 0 =0, =, =; T={,,,}, Ω = {,, } =Min{ +L, +L, +L }=Min{0+,+,+}= =Min{ +L }=+= 9 =Min{ +L }=+= 8 rd losest node = {}; = Iteration P={,,,}, 0 =0, =, =, =; T={,,} Ω = {, } =Min{ +L, +L }= =Min {+, +} = 8 =Min{ +L, +L }= =Min {+, +} = th losest node = {}; = 0, Jayant Rajgopal
Iteration P={,,,,}, 0 =0, =, =, =, =;; T={,} Ω = {, } = Min{ +L, +L, +L }= Min {+, +, +} = 8 =Min{ +L }=+ = th losest node = {}, =8 Iteration 6 N! 8 P={,,,,,}, 0 =0, =, =, =, =, =8; T={} Ω = {} = Min{ +L, +L } = Min {8+, +} = 6 th losest node = {}; = 8 0, Jayant Rajgopal
TH R-ULKRSN LGRITHM R TH MXIMUM LW PRLM STP 0: Start with some feasile flow (if one isn't ovious let flow in eah ar e equal to zero) from the soure node to the sink node. STP : If flow in ar (i-j) is less than apaity of ar (i-j) assign it to set I (set of ars along whih amount of flow an e Inreased). If flow in ar (i-j) is greater than zero assign it to set R (set of ars along whih amount of flow an e Redued). NT: n ar an elong to oth I and R. STP : LLING PRUR Lael the soure node. If the flow along an ar (i-j) is from a laeled node to an unlaeled node and the ar elongs to I, then lael the unlaeled node, all the ar a forward ar and let I(i-j) = apaity(i-j) - low(i-j) If the flow along an ar is from an unlaeled node to a laeled node and the ar elongs to R, then lael the unlaeled node and all the ar a akward ar and let R(i-j) = low(i-j) ontinue the laeling proedure until (a) the sink has een laeled, or () no more nodes an e laeled. STP : If the sink has not een laeled, STP; this is the optimum flow. If the sink has een laeled go to Step. STP : There is a hain from soure to sink. If has only forward ars, inrease the flow in eah ar y an amount f= Min( i j) {( I i j)} If has forward and akward ars, inrease the flow in eah forward and derease the flow in eah akward ar y an amount f= Min{ k = Min I( i j), k = Min R( i j)} ( i j) I ( i j) R Return to Step 0, Jayant Rajgopal
9 6 9 6 9 6 0, Jayant Rajgopal
9 6 9 6 0, Jayant Rajgopal
ut Set: Suppose V is any suset of all the nodes that ontains the sink ut not the soure, and V is the set of remaining nodes. Then the orresponding ut set is the set of all ars (i j) suh that i V and j V. The apaity of the ut is the sum of the apaities of all ars in the ut set..g., So Si V={,, Si} V={So,,, } ut Set={So,,,,, Si} apaity=+++++ = V={,,, Si} V={So,, } ut Set={So,,, } apaity=+++=8 0, Jayant Rajgopal
Lemma : The total flow from soure to sink in any feasile flow is no higher than the apaity of any ut set. In partiular, the optimal flow an never e higher than the apaity of any ut set. So, if we find some feasile flow and some ut set for whih the flow is equal to the apaity of the ut set, then this must e the optimal flow! Now, suppose we are doing our laeling and we get to a point where we re unale to lael the sink. Let V here orrespond to the nodes (inluding the sink ) that are not laeled and V to the nodes that have een laeled, and let us denote the orresponding ut set via. Lemma : If the sink annot e laeled, then the apaity of the ut set must e equal to the urrent flow from soure to sink. So, if the sink annot e laeled, the urrent flow must e optimal we just use Lemma to verify that the sink annot e laeled. 0, Jayant Rajgopal
9 6 6 ut Set: {,,, } apaity of ut Set = +++6 = V = {,,,, }; V = {,} 0, Jayant Rajgopal
Reall the MNP ssuming that i=..m i = 0 PRLM MN: Minimize all defined i-j ( ij x ij ) st j x ij - k x ki = i for i=,,,m L ij x ij U ij for all i-j
Minimize i j ( ij x ij ) st j x ij = S i if i pure supply nodes j x ij = j if i pure demand nodes j x ij k x ki = 0 or S i or i if i transshipment node (as the ase may e ) 0 x ij for all i-j
efine the starting node as a soure node with a supply of unit and the ending node (say m)as a sink node with a demand of unit. ll other nodes are transshipment nodes The ost assoiated with a node is its distane Then we have Minimize all defined i-j ( ij x ij ) st j x j = j x ij - k x ki k x km = - 0 x ij for all i-j = 0 for i=,,m-
Let the soure node have a very large supply (M) and the sink node have a very large demand equal to the same value M ll other nodes are transshipment nodes The ost assoiated with all ars are equal to zero, and the upper ound U ij for the flow along ar i j is set to the apaity of the ar ( ij ) inally, add a fititious ar from the soure to the sink node with U so si =M and a ost of Then we have (assume that soure node is node no., and the sink node is node no. m) Minimize x so-si st j x so-j = M j x ij - k x ki = 0 for i=,,m- - k x k-si = -M 0 x ij U ij for all i-j