TO5 Networng: Theory & undamentals nal xamnaton Professor Yanns. orls prl, Problem [ ponts]: onsder a rng networ wth nodes,,,. In ths networ, a customer that completes servce at node exts the networ wth probablty p, or t s routed to node + wth probablty -p, for =,,,-. ustomers that complete servce at node, ether ext the networ, or are routed to node, wth respectve probabltes p and -p. t each node, external customers arrve accordng to a Posson process wth rate γ. The servce tmes at each node are exponentally dstrbuted wth rate µ. The arrval processes and the servce tmes at the varous nodes are ndependent.. [ ponts] nd the aggregate arrval rates λ, =,,...,.. [ ponts] Under what condtons does the rng networ have a statonary dstrbuton?. [ ponts] ssumng that the condtons of queston are satsfed, fnd the statonary dstrbuton of the networ.. [ ponts] nd the average tme that a customer spends n the networ. 5. [ ponts] Is ths rng networ reversble? Justfy your answer. Soluton : The networ s shown n the followng fgure. Snce there are external arrvals, t s an open Jacson networ. γ γ p p p p + p γ p. The aggregate arrval rates satsfy: of 5
λ =γ+ ( p) λ λ =γ+ ( p) λ λ =γ+ ( p) λ λ =γ+ ( p) λ Snce all nodes are symmetrc same arrval rates, servce rates, and routng probabltes the aggregate arrval rates must be equal: λ =λ = =λ =λ. The above equatons, then, gve: λ =γ+ ( p) λ λ=. The networ has a statonary dstrbuton f the aggregate arrval rate at each node s less than the servce rate at the node. Therefore, we must have: γ < µ p. rom Jacson s theorem for open networs, the statonary dstrbuton s: pn n = γ p n = ρ ρ = ρ ρ ρ= p µ n n + + n (,, ) ( ) ( ) ( ), = =. The average number of customers at each queue s: γ p ρ N =, =,, ρ and the average number of customers n the networ: Snce the arrval rate at the networ s customer spends n the networ s: N = ρ ρ γ, Lttle s theorem mples that the average tme a N ρ T = = = γ γ ρ pµ γ 5. The networ s not tme reversble. To see ths, note that a transton of a customer from node to node + n the orgnal networ corresponds to a transton from node + to node n the reversed networ. onsderng state n wth n >, n the orgnal networ, we have: whle n the reversed networ: qnn (, e+ e ) =µ ( p) > + * q n n e e + (, + ) = snce customers cannot move from node to node + n the reversed networ. of 5
Problem [ ponts]: onsder a closed Jacson networ wth nodes and customers. The normalzaton constant for the networ s: ( ) = ρ ρ ρ () n + + n = n n n. [ ponts] Show that the number of terms n the summaton on the rght-hand sde of eq. () s +. [ ponts] Show that the normalzaton constant can be calculated based on the followng teratve algorthm (uzen s algorthm): wth ntal condtons: m (, ) = m (, ) +ρ m (, ), m=,,...,, =,..., m (,) =ρ, m=,..., m (, ) =, =,..., (). [5 ponts] Let x be the number of customers at node at steady state. Prove that: m ( m) Px { m} =ρ, m=,,..., ( ). [5 ponts] Prove that the average throughput of node s: ( ) γ ( ) =λ () ( ) Soluton :. The number of terms n the summaton s equal to the number of possble states ( n,..., n ), such that n + + n =. Note that each state corresponds to a way of dstrbutng the customers ( balls ) n the queues ( boxes ). Recallng that there are + + = ways to dstrbute balls n boxes, the result follows.. or m > and > we splt the sum nto two sums over dsont sets of ndces, correspondng to n =, and n >. n m (, ) = ρ ρ ρ n + + n = m n n n n n n n n n+ + n = m n+ + n = m n = n > = ρ ρ ρ + ρ ρ ρ = ρ ρ ρ + ρ ρ ρ n n n n n n+ + n = m n+ + n = m n n > n n of 5
Note that the frst sum s m (, ). or the second sum, observng that n >, we defne n = n +, where n. Then: ρ ρ ρ = ρ ρ ρ n n n n n n+ + n = m n+ + n + = m n > n Therefore: m (, ) = m (, ) +ρ m (, ). We have: Px { m} = pn ( ) = = n + =ρ ρ ρ ρ =ρ m (, ) n n n n + + n = m n n ( ) n + + n+ + n= n m n m n + + n + m+ + n= n + m m n n + m ( ) n ρ ρ ρ ρ = ρ ρ ( ) n ρ ρ ρ ( ) n m n n n ρ n + + n + + n= m n m ρ = ( m) ( ). or the average throughput of node : ( ) ( ) γ ( ) =µ P{ x } =µ ρ =λ ( ) ( ) n of 5
Problem [ ponts]: onsder the closed Jacson networ of gure, wth = nodes and customers. µ µ µ gure γ ( ). [5 ponts] alculate the normalzaton constant ( ) explctly, usng eq. ().. [5 ponts] nd the average throughput γ ( ) of each node as a functon of the number of customers.. [5 ponts] Use uzen s algorthm, descrbed by eq. (), to calculate ( ) and γ ( ), for =,,,,5.. [5 ponts] onsder the closed networ of gure, wth = nodes and customers. r = r = µ µ µ γ( ) gure Show that ths new networ has the same statonary dstrbuton wth the networ shown n gure. [Note: You can answer ths queston wthout calculatng the statonary dstrbutons explctly.] Soluton : The vst ratos at the three queues are equal: λ =λ =λ =λ. or a closed networ these rates can only be determned to the extent of a multplcatve constant. Therefore, we can set λ=µ. Then: ρ =ρ =, ρ = 5 of 5
. The normalzaton constant s: ( ) = ρ ρ ρ = = n n n n n n + n+ n= n+ n+ n= n= n+ n= n = n + = + ( ) n n n n= n n= Smlarly to queston n Problem, the sum over n + n = nn the above dervaton has terms. rom eq. (), we have: n + ( ) n + = = n + n n ( ) = ( + ) n n n n= n= To compute the second seres, note that for any x, we have: N Then, eq. (5) gves: nx n n= n= () (5) N N+ N+ N n x Nx ( N + ) x + = x = = x x x ( x ) + + (/) (/) ( + )(/) + ( ) = ( + ) / ( /) + + = = +. Usng eq. (), the average throughput of node s: + ( ) + ( ) γ ( ) =λ =µ, =,, ( ) +. Usng uzen's algorthm, we can fnd the value of () for a gven, teratvely, as descrbed by eq. (). The average throughput of the varous queues can be found from (-) and (), usng eq. (). The teratve calculaton s organzed n the followng tables. The frst table shows the values m (, ) calculated by uzen's algorthm, whle the second gves the normalzaton constant and the throughput for =,,,,,5. of 5
= = = ( ) γ ( ) m = m = m = m = m = 5 m = 5. or the closed networ of gure, the flow conservaton equatons are Tang λ =µ, we have: ρ 5 9 8 9 λ λ λ =, λ =, λ =λ +λ ρ =ρ =, ρ = 5 5 9 8 9 5 µ µ 9 µ 98 9 µ 8 µ whch are equal to the 's of the nodes n the networ shown n gure. Therefore, the two networs have the same statonary dstrbuton: pn (, n, n) = ρ ρ ρ n n n n n n ρ ρ ρ n+ n+ n= of 5
Problem [ ponts]: onsder the networ of gure, whch s represented by a drectonal graph, wth cost (length) d assocated wth each drected ln (, ). 5 5 gure. [ ponts] nd the shortest dstance from every node n the networ to destnaton node, usng two dfferent shortest path algorthms ellman-ord, stra, or loyd-warshall. or each algorthm, ndcate clearly the operatons performed at each teraton of the algorthm.. [ ponts] The networ s transformed by replacng each par of drected lns wth a sngle bdrectonal ln. The cost (weght) of the bdrectonal ln s equal to the maxmum of the costs of the two orgnal drectonal lns t replaces. nd a mnmum weght spannng tree, usng Prm s algorthm. Indcate clearly all steps n the constructon of the mnmum weght spannng tree. Soluton :. Snce ln (,) has negatve length, we cannot use stra's algorthm for the computaton of the shortest dstances the algorthm can only be used n networs wth nonnegatve lengths. Therefore, we wll use (a) the ellman-ord, and (b) the loyd-warshall algorthms to calculate the shortest dstances of all nodes to destnaton node. In fact, loyd-warshall algorthm wll determne the shortest dstance between all par of nodes and n the networ. ellman-ord lgorthm: The algorthm terates on the maxmum number of hops (lns) h that are allowed on a wal from any node to destnaton node. t teraton h, the algorthm h determnes the shortest dstance of node to node, when wals of at most h hops are consdered for all. The algorthm performs the followng teraton: wth ntal condtons: = mn{ d + }, h+ h h+ = =, = 8 of 5
The ellman-ord algorthm determnes the correct shortest dstances after at most N- teratons f and only f, there are no cycles wth negatve length a condton that s satsfed by the networ under consderaton. The operatons performed at each teraton of the algorthm can be organzed n a tabular h formulaton, where the entres at row h are, =,,...,,.e., the shortest dstances of all nodes to destnaton node, over paths wth at most h hops. Snce all cycles n the networ have postve lengths, any shortest ( h) wal cannot contan any cycles and s therefore a path. h = h = 5 h = 5 - h = - h = - h = 5-5 h = - 5 5 The algorthm termnates after teratons, snce =, =,,...,. These are the shortest dstances from the correspondng nodes to node. loyd-warshall: The loyd-warshall algorthm computes the shortest dstances between every par of nodes and. The algorthm terates on the set of nodes that can be used as ntermedate nodes along the paths between two nodes, augmentng that set by one node at each teraton. ssumng that the nodes are labeled as,,,n and that they are consdered as ntermedate nodes accordng these labels, then at teraton n, only nodes {,,n} can be used as ntermedate nodes. t teraton n+, node n+ s also consdered as ntermedate node, and the algorthm performs the update: where n n = ; Intermedate nodes = {} = mn{, + },, n+ n n n, n+ n+, s the shortest dstance from to when only nodes,,,n can be used as ntermedate nodes. The evoluton of the algorthm can be represented by a seres of matrces. The n th n matrx gves for all nodes and. 5-5 9 of 5
n = ; Intermedate nodes = {} 5 8 9-5 9 n = ; Intermedate nodes = {,} 9 8 5 8 9-5 9 n = ; Intermedate nodes = {,,} 9 8 5 5 - -5 - - n = ; Intermedate nodes = {,,,} 5 5 5-9 5-5 - 8 9 8 - of 5
n = 5; Intermedate nodes = {,,,,} 5 - - - -5 - - - - 9 8 - n = ; Intermedate nodes = {,,,,,} 5 - - - -5 - - - - 9 8 - n = ; Intermedate nodes = {,,,,,,} 5 5 - - - -5 - - - - 5 5 - of 5
. onsder now the undrected graph wth bdrectonal lns of gure. gure We use Prm s lgorthm to construct a mnmum weght spannng tree (ST). The algorthm starts wth an arbtrary node as the ntal fragment. t each teraton, the fragment s augmented by addng an adacent ln wth mnmum weght that does not create a cycle. ssume that the ST algorthm starts wth node as the ntal fragment. The constructon of the ST s llustrated n the followng fgures. n = of 5
n = 5 n = n = n = of 5
n = of 5
ellman-ord lgorthm: wth ntal condtons: = mn{ d + }, h+ h h+ = =, = stra s lgorthm: Intalzaton: P= {}, =, = d, Iteraton step : nd P, such that = mn. Set P: = P { }. P Iteraton step : or all P, set: : = mn{, d + }. loyd-warshall lgorthm: n + mn{ n, n n =, n + n, }, wth ntal condtons: = d, + + verage number of customers n an // queue: ρ N =, ρ=λ / µ ρ Other useful formulas: N n= N n x x = x n nx = x N + N n= n= x n 5 of 5