the immunity of networks refers to the ability of a network to preserve its function , even when a certain number of edges or vertices is removed .this attribute is of interest in many types of networks .the immunity of genetic , cellular networks reflects the robustness of the network under a mutation or deletion of one of the genes .the robustness of the metabolic network of single cell organisms is demonstrated by their persistence and growth despite environmental interventions . in communication networks, immunity refers to the ability of the network to pass messages among most of its vertices even after some communication lines are cut , or some vertices are damaged .a communication network is immune to such an attack , if it retains a connected section that spans enough vertices to allow some communication ( even if quite indirect ) between any two vertices .  in this paper, we extend these ideas to analyze the immunity of a network composed of droplets connected by polymers .the gel phase of such a system is characterized by a connected part of the network that spans the entire volume .the immunity of the gel is characterized by the fraction of polymers that can be removed ( by chemical breaking , depolymerization or by shear forces ) from the network while the gel maintains its macroscopic characteristics , and does not transform into the fluid phase .that is , a gel is immune if the physical network that comprises the gel retains a macroscopically connected component even though a relatively high fraction of the polymers that form the network have been deleted .a simple polymer gel is a network of connected polymers in which each edge ( _ i.e. _ , bond ) of the network consists of one polymer ; in this case , the concept of immunity is idential with that of percolation .however , in the system of polymers that join microemulsion droplets , each edge ( _ i.e. _ , bond ) that connects two oil droplets may contain more than one polymer and sometimes many polymers .the percolation problem deals with the removal of entire edges from the network , while immunity refers to the removal of individual polymers from a given edge in systems where there can be many polymers in an edge .examples of equilibrium , network - forming systems include surfactant solutions , gels of biological molecules or synthetic polymers . a particularly elegant experimental realization of a transient , self - assembling , physical network has been reported in .the system consists of oil - in - water microemulsion droplets connected by telechelic polymers ; the latter have a hydrophilic backbone with a hydrophobic group at each chain end .the insolubility of these groups in the continuous water phase and their solubility in the oil droplets results , in some cases , in a network of droplets connected by the polymers .mixtures of telechelic polymers and microemulsions have a wide range of technological applications , including paints , cosmetics and enhanced oil recovery .precise control of the structural and rheological properties of such materials is essential for effective and reliable performance .such control is possible using the telechelic additives , that form a transient network with controlled rheological and structural properties that depends only on the physical properties of the system such as the size and concentration of the polymers and the droplets .apart from its applied interest , the telechelic - microemulsion mixtures serve as model systems for the understanding of a more general class of transient networks .the advantage of this particular system is that the parameters that control the thermodynamics and structure can be easily identified and independently controlled : the _ concentration of possible vertices _ ( the droplets ) and the _ connectivity of the network _ ( the number of polymers per droplet ) .  the experimental systems exhibit a phase transition from a single phase to coexisting high density and low density network phases .zilman et al . showed that this transition is expected from entropic considerations alone , and occurs even without any particular energetic interactions between the droplets and polymers . in this paper , we extend the analysis of and examine the immunity of such polymer gels to random degradation of the polymers such as those that can result from chemical degradation or from shear forces . as the polymers are removed , the macroscopic network becomes disconnected and the gel reverts to a liquid .we show the interactions between the hydrophobic groups at the ends of the polymers have an important affect on the immunity and the phase behavior of the system .the relation between the degradation of the polymers and the breakdown of the network is not trivial .each edge in the network may contain several polymers , each of which connect one pair of droplets .the fraction of polymers that must be degraded in order for the network to lose its connectivity depends on the distribution , , of the number of polymers in an edge . as the variance of the distribution increases ,the network becomes more sensitive to polymer degradation , and will lose its connectivity when a smaller fraction of polymers is degraded .we consider the distribution , , for various physical situations .since we are treating relatively rigid and short polymers , we do not consider the interactions between the chains , but focus on the interactions between hydrophobic groups at the end of the polymers , which we denote as _ stickers_. in particular , we predict the effect of both repulsive and attractive interactions between the stickers within a droplet .repulsive interactions are expected from entropic and excluded volume considerations , while attractive interactions can arise from van der waals forces , or from the local change of curvature that the hydrophobic ends induce on the droplet surface .we find that repulsive interactions decrease the variance of while attractive interaction increase the variance .attractive interactions between the stickers may lead to the co - existence of dense edges , with high density of polymers , with dilute edges , with low polymer density . in that case ,the distribution of the edge occupation number , , is bimodal , and its width is of the order of its average .as the system approaches the critical point associated with the emergence of this two - phase behavior , the fluctuations in the number of polymers in an edge as well as the variance of , increase . thus , as we _ increase _ the strength of the interaction between the stickers toward its critical value , local concentration fluctuations increase , and the immunity _ decreases_.  in sec .[ sec1 ] we describe the underlying physical model for the network forming systems of interest , and the simplified theoretical model we use in our calculations .next , in sec .[ sec2 ] , we examine some simple distributions for and demonstrate the dependence of the immunity of the gel on the variance of the distribution .the effects of repulsive and attractive interactions between the polymer ends on or in a droplet are presented in sec .we use an expression for the landau free energy of the system of both interacting polymers and droplets to obtain the effect of the interactions on the variance of , and we predict the phase diagram of this system .we map the physical space to a discrete regular lattice , where each site can be occupied by an oil droplet .each pair of neighboring droplets may be connected by polymers .the set of polymers that connect such a pair is referred to as an _ edge _ of the network , whose vertices are the droplets .  from the applications of percolation theory to gelation we know that if the fraction , , of occupied edges exceeds the percolation threshold , , of the lattice , the system is in the gel phase . in the usual discussions of gel connectivity and percolation ,each edge is occupied by one polymer .after the degradation of a fraction of the polymers , the condition for the survival of the gel phase is .  however , the system we discuss here has two important and interesting differences from the usual percolation models :  1 .the vertices of the polymer network only exist at those lattice sites at which the oil droplets are present , so only two neighboring vertices of the lattice that are each occupied by droplets can be connected by an edge . in the following ,we refer to such a pair as an _ edge _ even it is not connected by polymers , in which case we consider it as a disconnected edge .if a given droplet has a neighboring vacant lattice site , we refer to the the droplet surface that face this site as a _free face_. 2 .an edge may be occupied by a number , , of polymers , whose value is determined by volume limitations ( in the case of excluded volume interactions ) , explicit interactions between the polymers or between the stickers , and the polymer chemical potential - which is fixed by their concentration in the solution .the polymer chemical potential determines the average number of polymers in an edge , .in this section , we concentrate on the effect of the edge occupation distribution , , on the immunity .we do not consider here the droplet - related degrees of freedom , but rather assume that they are fixed in a given ( static ) configuration .the following section considers the droplet - related degrees of freedom .the only degrees of freedom we relate to in this section are occupation , , of the edges between neighboring droplets .if the droplets are dense enough , and most of the edges are connected by one or more polymers , then the system has a connected component that spans its entire volume , and the system is in the gel phase . if the fraction of disconnected edges ( _ i.e. _ those that contain no polymer ) , is large , the system is in the fluid phase .a system in the gel phase that undergoes a degradation of a fraction of its polymers , has higher immunity if fewer edges are completely disconnected by the degradation process .this will depend on the number of polymers per edge and on the variation of this number throughout the network .for example , if the system has a distribution of edges in which some edges have large numbers of polymers and some have very few , it will have lower immunity than a system in which the number of polymers in each edge is the same .this is because the random removal of polymers from edges with lower than average occupancy more readily leads to the complete disconnection of that edge , as demonstrated in fig .[ fig1 ] .the probability for a given edge to be occupied by polymers is ; the fraction of unoccupied , disconnected , edges is given by - the probability of a pair of neighboring droplets to have no polymers linking them .  after a fraction of the polymersis degraded , the new occupation of an edge which had polymers is proportional to the product of the probability of a number , of polymers to remain in the edge , and the probability of the remaining polymers to be removed , .the resulting distribution can be written   the new fraction of unoccupied edges is . the higher this quantity for a given initial average edge occupation , , and a given degradation probability , , the lower the immunity of the system .in order to elucidate relation between the variance of the edge occupation distribution and the immunity of the gel , we first study two simple distributions . the first is a uniform distribution , with an average and variance .if we randomly delete a fraction of the polymers , then the fraction of unoccupied edges is which is an increasing function of for any value of .thus , in a distribution with a larger variance , the probability of an edge to remain connected is smaller , and it is _ less immune _ to random polymer degradation .the second distribution we would like to consider is the bimodal distribution depicted in fig .[ fig1 ] : with an average and variance . after a deletion of a fraction of the polymers ,the fraction of disconnected edges is as the variance increases , the system become less immune to random polymer degradation , as demonstrated in fig .this is relevant to polymer - microemulsion systems with a bimodal distribution of the number of polymers in an edge , as expected when the attractive interactions between the hydrophobic stickers at the polymer ends are large ( see sec .[ sec3 ] ) .  in the following sections we consider several physical models corresponding to different physical interactions between the polymers and stickers , that yield different edge occupation distributions , .we calculate the variance for each situation to estimate the gel immunity and how it depends on the interactions .  , of the number of polymers in an edge .we compare a homogeneous system ( a ) with 11 polymers in each edge ( mean and distribution width ) vs. a system with bimodal ( b ) , as given by eq .[ eqtoybin ] ( , ) . after a random deletion of a fraction , , of the polymers ,most of the edges in the homogeneous system ( c ) survive , and it still retains a macroscopically connected component . in the inhomogeneous system , most of the dilute edges are eliminated by the deletion ( d ) and the system no longer has a macroscopically connected component . ]we first examine a naive , but instructive , model where any edge can accommodate an infinite number of polymers . in order to compare it with other models, we express the variance as a function of the polymer concentration , which is the control parameter in most of the experiments .first , we calculate the distribution in the grand canonical ensemble , in which the chemical potential , , of the polymers is fixed .we then calculate the dependence of on the polymer concentration , to determine .the distribution is given by where the factorial in the denominator comes from the fact that the polymers are indistinguishable .this distribution has an average and a variance .   in a more realistic model ,the excluded volume interactions limit the maximum number of polymers that can reside in a given droplet .there is thus a finite , maximal number of polymers , , associated with one edge .the volume restriction may arise from helfrich - like , excluded volume interactions between the polymer chains , or from the finite area occupied by each sticker in or on the surface of a droplet .if the only interactions between the polymers and between the stickers are short range excluded volume interactions , we can assume that there are sites in an edge , that can each be occupied by one polymer .the distribution of the edge occupation is where is the partition function .the free energy per site ( we take all energies in units of ) is .the average edge occupation is and the variance of the distribution is the variance here is smaller than in the case of non - interacting polymers ( eq . [ eq : psignaive ] ) . in the non - interacting case ,the variance was equal to , where in the present case it is smaller by a factor of .as expected , the difference between the distributions vanishes for the case .the narrowing of the distribution by the excluded volume interactions increases as the average number of polymers per edge approaches , where the variance vanishes and the distribution approaches a delta function as .this suggests that repulsive interactions between the polymers or the stickers increase the immunity of the gel under a random degradation of the polymers .we now calculate the free energy of a system of droplets and polymers in which the polymers show attractive or repulsive interactions in the multi - canonical ensemble , where the number of polymers and droplets is not fixed , and is determined by the chemical potentials and , respectively .we shall consider the possibility of polymers that connect neighboring droplets as well as polymers that form loops , in which both sticker ends reside in the same droplet .the physical model can be associated with the vertices ( droplets ) and edges of an underlying graph .the vertices are given by the sites of the underlying lattice which are occupied by the droplets .the edges of the graph connect pairs of neighboring occupied vertices on the lattice .since each site may be occupied by a droplet , the statistical ensemble we consider here includes the sub - graphs of the lattice ( though most of them have negligible weight ) .we divide each droplet into _ faces _ , one for each edge of the graph that emerges from its vertex .if another droplet occupies a vertex that is connected to the same opposite edge , then the corresponding face is associated with the edge between the two droplets , and we call it a _ linked face_. if there is no neighboring droplet at the vertex connected to a given edge , we term it a _free face_.  we consider systems in which the radius of gyration of a polymer is smaller than the radius of a droplet .thus , we treat each edge and each free face as a separate system . in an experiment , where the total number of polymers is fixed, the edges and faces interact through this constraint . in the multi - canonical ensemble ,however , they do not interact .we can thus treat each edge or free face as an independent system and write its partition function explicitly .  as discussed above ,excluded volume interactions imply that a face can contain a maximum of stickers .this means that an edge has a maximal occupation of polymers .these polymers can be links - with the two telechelic stickers of a given polymer attached to the two opposing faces of adjacent droplets , or loops - with both stickers of a given polymers attached to the same face of a single droplet .a face can contain a maximum of such loops .we consider a model in which , except for the excluded volume interactions that determine the maximal number of polymers per droplet , , polymers interact only through their stickers ( telechelic ends ) .the interactions between the polymer chains have a negligible contribution for the case of relatively short and stiff chains that we consider here .thus the energy difference between an edge that has two loops on the opposite faces of two neighboring droplets , and an edge in which these faces are linked by two polymers , is simply , where is the configurational free energy of a loop , and is that of a link .we thus define an effective thermodynamic potential of a polymer in an edge an edge where all the polymers have a thermodynamic potential is equivalent to a one in which loops have a potential of and links a thermodynamic potential of , in the sense that both systems have the same partition function and hence yield the same distribution .thus , we assume that all polymers in the edge have a thermodynamic potential of , whether they are loops or links .  in a free face , where the polymers are all in loop configurations , the thermodynamic potential of a polymer is , where .the free energy of an edge or a free face depends only on the effective thermodynamic potential of the polymers and the interaction between the stickers , which is similar in both the linked faces and free faces .we denote the free energy of an edge as , where is the free energy density ( free energy per polymer site ) of the face surface , or the free energy of one of the sites on the face .since in our model a free face differs from an edge only in the number of sites available ( _ i.e. _ , only polymers can be accommodated on a free face ) and in the effective thermodynamic potential , its free energy is .one can readily derive the free energy , , of a system with only excluded volume interactions : .we considered such a system in subsection [ ssev ] , where we ignored the configurational free energy of the polymers .the interactions between the stickers are accounted for within a mean field approximation .the total interaction energy for an edge with polymers is written as .the number of stickers that occupy a given edge is .we therefore write the interaction free energy due to two - body interactions among the stickers using a virial - type term : . the partition function is ^{\sigma_m}\end{aligned}\ ] ]we consider this expression for as the partition function of an effective hamiltonian , $ ] , that has a minimum at , given by : for the distribution of tends to a sharp peak around , and we can use the mean field approximation to estimate the average fraction of sites occupied in an edge and its variance : this expression applies whether is positive ( attractive interactions ) , negative ( repulsive interactions ) , or zero .[ eqra ] suggests a divergence of the variance for . in a macroscopic system ( ) , this signifies an instability related to macroscopic phase separation .we do not expect such behavior for finite ( which is more realistic ) , but we do observe a pronounced increase in the variance , as the interaction strength increases ( see fig .[ figvarsig ] ) .the increase in the variance is due to a bimodal distribution of the polymer density in the bonds , as demonstrated in fig .[ figbimodal ] . for large values of , the distribution resembles the bimodal toy distribution in eq .[ eqtoybin ] .in such a system , when the interactions are strong enough , one may observe two kinds of edges connecting the droplets : dilute edges containing one or a few polymers , and dense edges , containing about polymers .both kinds induce the same effective attraction between the droplets ( see below ) . under degradation ,most of the dilute edges will break down , and the connectivity of the network may decrease dramatically , as depicted in fig . [ fig1]d .if the system was in the gel phase , and the connectivity is reduced below the percolation threshold , the gel will transform into a fluid phase .  ) , for .the values of the attractive interaction , , are in units of . ]   of the number of polymers in a bond , for and .the effective chemical potential is such that .the values of are in units of . ]we conclude by obtaining an analytical expression for the mean - field free energy of an edge , which is a good approximation for the case .expansion of the effective hamiltonian around its minimum yields , where . plugging this approximation into the integral of eq .[ hs1 ] and taking the logarithm , we obtain the grand - canonical potential for a single edge : \nonumber \\ * & & \ = \frac{\alpha}{2}\bar\varphi^2 + \log(1-\bar\varphi ) - \frac{1}{2\sigma_m } \log(1-\alpha\bar\varphi(1-\bar\varphi ) ) \;,\end{aligned}\ ] ] where is determined by the value of , and the last equality is obtained using equations [ phi0 ] and [ eq11 ] .each vertex of the network in our model can occupy one oil droplet .we define as the occupation number associated with vertex in the lattice .the number of edges in a given configuration of the system is , where the sum is over pairs of neighboring sites .the number of free faces is .the number of droplets is .each edge has a free energy , , and every free face has a free energy , .the partition function of the system containing both polymers ( which have both interactions and configurational entropy ) and droplets ( which have translational entropy ) is given by the sum over all droplet configurations : \nonumber\\ & & = \sum_{\{s\ } } \exp\left [ n_{\rm d } \left ( \mu_{\rm d } + \frac{\zeta}{2}\sigma_m { f_{\rm e}}(\mu+\delta ) \right ) + n_{\rm e } j(\mu,\delta ) \right ] , \nonumber\\ & & \\end{aligned}\ ] ] where is the chemical potential of the droplets , is the effective interaction between the droplets , mediated by the polymers , and is the number of nearest neighbors at each site .this is equivalent to the partition function of a lattice gas model .we use a landau type , coarse grained approximation for the free energy , as a function of the dimensionless concentration ( volume fraction ) of droplets , , which is the average occupation per vertex : the first two terms in eq .[ landau ] give the lattice gas entropy ; the third term is obtained using , where is the volume of the system ; the fourth term is obtained from eq .[ za ] using the mean - field approximation .the dependence of on the potential is linear in the droplet concentration , and this term has no effect on the phase behavior of the system .  in the coexistence region, there is an equilibrium of droplet chemical potential , , and of the osmotic pressure , , between the coexisting phases . in equilibrium, the polymer chemical potential must be the same in both phases ; this is automatically ensured by working at constant . by solving these equalitieswe obtain the binodal curve in ( droplet concentration - polymer thermodynamic potential ) plane .since in experiment it is easier to control the polymer concentration than the polymer chemical potential , it is useful to predict the phase diagram in the plane .we perform this transformation using the identity \;,\ ] ] where the prime indicates a derivative with respect to .this fixes the polymer chemical potential , , as a function of the number of polymers , . in the phase - coexistence region , above the binodal curve , the conditions of constant droplet chemical potential , , and osmotic pressure , , for fixed polymer chemical potential , , yield values of the droplet density , , for the coexisting dilute and dense phases respecitvely . from eq .[ eqvarphi ] this implies that each phase has a different value of the polymer concentration , .  the critical point in the ( droplet concentration - polymer concentration ) plane occurs at , with given by   ( given in units of ) .the curves are obtained from the condition of equilibrium of the droplet chemical potentials , , and osmotic pressure , , in the coexisting phases , using the landau free energy is given by eq .[ landau ] .the -axis represents the droplet volume fraction , , and the -axis represents the number of polymers per available site , .the parameters used are , and . ]  the binodal curve of the system is presented in fig .[ figpd ] for different values of the edge interaction .the maximal number of stickers that can reside in one droplet is .thus , the number of stickers per unit volume is , and the maximal number of polymers per unit volume is ( assuming a prohibitively high energetic cost of a hydrophobic sticker in the water ) .the number of polymers per available site in the system is then   a phase co - existence region is present in a system without explicit sticker interactions ( ) .however , the interactions can markedly affect the shape of the coexistence curve and of the concentrations in the two co - existing phases .as the interaction , , increases , the effective interaction between the droplets , induced by the edges , increases and becomes more sensitive to the polymer concentration . as a result ,the onset of phase separation is sharper , and characterized by a phase with very dilute droplets and low polymer concentration that coexists with a phase with high droplet density and high polymer concentration .in fact , in fig . [ figpd ]the curve for is almost parallel to the tie - lines .we note that dilute edges ( with one or a few polymers ) can also exist in the dense droplet phase , since they induce the same effective interaction , , between the droplets as the dense edges , and their polymers have the same thermodynamic potential , , as the polymers in the dense edges .this scenario may change if we consider interactions between the edges .in this paper , we have predicted the immunity of the gel phase of a polymer - microemulsion system to random degradation of polymers .the gel in this system consists of oil droplets connected by telechelic polymers .the set of polymers that link a given pair of droplets is defined as an edge ( _ i.e. _ , bond ) of the gel network .we consider the distribution , , of the number of polymers in one such edge , and argue that immunity of the gel is inversely related to the variance , , of this distribution .repulsive interactions between the stickers ( the telechelic ends of the polymers ) reduce the variance , thus contributing to the gel immunity .attractive interaction , which increase , reduce the immunity of the gel .attractive interactions may give rise to a bimodal distribution of the edge occupation , which can give rise to the co - existence of dense and dilute edges in the same macroscopic sample . a dilute edgecontains a small number of polymers , and is likely to vanish under a random degradation of the polymers .when a finite fraction ( say , ) of the edges are dilute , the fraction of edges surviving a degradation will be lower , and the system is more likely to transform from the gel to the fluid phase .this reasoning is particularly applicable to the case of a dense phase that coexists with a dilute phase ( assuming the dilute phase is not a gel ) .since the polymer density _ within _ the dense droplet phase is high , we expect if the attractive interactions are large enough to find a bimodal distribution of the edge occupation within the dense droplet phase . in that case, we are interested in the immunity of the dense phase , and therefore must take into account the distribution , , within the dense droplet phase .  to test our predictions for the immunity of a system with attractive interactions among the polymers, we suggest comparing the elastic stability ( gel - like nature ) with respect to polymer degradation of two systems ( both in the dense phase ) : one with no sticker interactions ( ) and one with strong interactions ( say , ) . according to our predictions ,the system with no interactions will be characterized by edges each of which has approximately the same number of polymers , while the system with strong interactions will show a bimodal distribution for the edge occupancy .we predict that after polymer degradation the fraction of surviving edges will be larger in the non - interacting system ( see fig .[ fig1 ] ) , and that this system is more likely to remain in the gel phase .  in order to investigate the immunity of such gels experimentally ,it is necessary to devise a method to degrade the polymers at random and in a homogeneous manner throughout the system. it may be difficult to do this using molecules in a solvent , since a solvent added to the system will initially have a much higher concentration at the surface of the gel ( penetrating the bulk by slow diffusion ) ; thus the polymers near the surface are much more likely to be degraded .one way to achieve random degradation may be to use polymers that have been synthesized with a photo - sensitive molecule in the middle of each chain .optical methods might be used to cause these molecules to change their conformation and depolymerize .the intensity and duration of the optical beam can be used to control the fraction of polymers broken .the authors thank l. chai , m. gottlieb , s. havelin , j. klein , c. ligoure , g. porte , and a. zilman for useful discussions .this work has been supported by the german israeli foundation and by an eu network grant .6 r. albert and a. l. barabsi , rev .* 74 * , 47 ( 2002 ) .a. wagner , nature genetics * 24 * , 355 ( 2000 ) .r. albert , h. jeong and a. l. barabsi , nature * 406 * , 378 ( 2000 ) .r. cohen r , s. havlin and d. ben - avraham , phys .lett . * 91 * , 247901 ( 2003 ) .e. michel , j. appell , f. molino , j. kieffer and g. porte , j. rheol .* 45 * , 1465 ( 2001 ) ; m. filali , m. j. ouazzani , e. michel , r. aznar , g. porte and j. appel , j. phys . chem .b * 105 * , 10528 ( 2001 ) .m. adam , d. lairez , m. karpasas and m. gottlieb , macromolecules * 30 * , 5920 ( 1997 ) .a. zilman , j. kieffer , f. molino , g. porte and s. a. safran , phys .91 * , 015901 ( 2003 ) .

Abstract: the concept of network immunity , _ i.e. _ , the robustness of the network connectivity after a random deletion of edges or vertices , has been investigated in biological or communication networks . we apply this concept to a self - assembling , physical network of microemulsion droplets connected by telechelic polymers , where more than one polymer can connect a pair of droplets . the gel phase of this system has higher immunity if it is more likely to survive ( _ i.e. _ , maintain a macroscopic , connected component ) when some of the polymers are randomly degraded . we consider the distribution of the number of polymers between a pair of droplets , and show that gel immunity decreases as the variance of increases . repulsive interactions between the polymers decrease the variance , while attractive interactions increase the variance , and may result in a bimodal .


managing and operating traditional computer networks is known to be a challenging , manual and error - prone process . given the critical role computer networks play today , not only in the context of the wide - area internet but also of enterprise and data center networks , this is worrisome .software - defined networks ( sdns ) in general and the openflow standard in particular , promise to overcome these problems by enabling automation , formal reasoning and verification , as well as by defining open standards for vendors .indeed , there is also a wide consensus that formal verifiability is one of the key advantages of sdn over past attempts to innovate computer networks , e.g. , in the context of active networking  .accordingly , sdn / openflow is seen as a promising paradigm toward more dependable computer networks .  at the core of the software - defined networking paradigmlies the desire to program the network . in a nutshell ,in an sdn , a general - purpose computer manages a set of programmable switches , by installing rules ( e.g. , for forwarding ) and reacting to events ( e.g. , newly arriving flows or link failures ) .in particular , openflow follows a match - action paradigm : the controller installs rules which define , using a _ match _ pattern ( expressed over the _ packet header fields _ , and defining a _ flow _ ) , which packets ( of a flow ) are subject to which _ actions _( e.g. , forwarding to a certain port ) .while the openflow api is simple and allows to manipulate hardware configurations in flexible ways , it is very low level and not well - suited as a language for human programmers .accordingly , over the last years , several more high - level and expressive domain - specific sdn languages have been developed , especially within the frenetic project  .these languages can also be used to express fundamental network queries , for example related to _reachability _ : they help administrators answer questions such as _ `` can a given host  reach host  ? '' _ or_ `` is traffic between hosts  and  isolated from traffic between hosts  and ?''_.  what is missing today however is a domain - specific language which allows to describe the important _ weighted aspects _ of networking .e.g. , real networks naturally come with capacity constraints , and especially in the wide - area network ( wan ) as well as in data centers , bandwidth is a precious resource .similarly , networks come with latency and/or monetary costs : transmitting a packet over a wide - area link , or over a highly utilized link , may entail a non - trivial latency , and inter - isp links may also be attributed with monetary costs .= [ fill = white , draw , text = black ] = [ thick , decoration = markings , mark = at position 1 with , double distance=1.4pt , shorten > = 5.5pt , preaction = decorate , postaction = draw , line width=1.4pt , white , shorten > = 4.5pt ] = [ semithick , white , line width=1.4pt , shorten > = 4.5pt ] ( s ) at ( 0,1 ) ; ( f1 ) at ( 3,2 ) ; ( e ) at ( 3,0 ) ; ( f2 - 1 ) at ( 6,2 ) ; ( f2 - 2 ) at ( 6,0 ) ; ( t ) at ( 9,1 ) ;  \(s ) ( f1 ) ; at ( 1.5,1.6 ) ;  \(s ) ( e ) ; at ( 1.5,-0.1 ) ;  ( f1 ) ( f2 - 1 ) ; at ( 4.5,2 ) ;  \(e ) ( f2 - 2 ) ; at ( 4.5,-.6 ) ;  ( f2 - 1 ) ( t ) ; at ( 7.5,1.6 ) ;  ( f2 - 2 ) ( t ) ; at ( 7.5,-0.1 ) ;  ( f1 ) ( f2 - 2 ) ; at ( 3.5,1 ) ;  \(e ) ( f2 - 1 ) ; at ( 3.5,0.4 ) ;  [ fig : sc ]  weights may not be limited to links only , but also nodes ( switches or routers ) have capacities and costs e.g. , related to the packet rate .what is more , today s computer networks provide a wide spectrum of in - network functions related to security ( e.g. , firewalls ) and performance ( e.g. , caches , wan optimizers ) .to give an example , today , the number of so - called _ middleboxes _ in enterprise networks can be in the same order of magnitude as the number of routers  .a domain specific language for sdns should be expressive enough to account for middleboxes which can change ( e.g. , compress or increase ) the rate of the traffic passing through them .moreover , a network language should be able to define that traffic must pass through these middleboxes in the first place , i.e. , that routing policies fulfill waypointing invariants  . with the advent of more virtualized middleboxes , and the _ network function virtualization _ paradigm ,short _ nfv _ , ( virtualized ) middleboxes may also be _ composed _ to form more complex network services .for example , sdn traffic engineering flexibilities can be used to steer traffic through a series of middleboxes , concatenating the individual functions into so - called _ service chains _  .for instance , a network operator might want to ensure that all traffic from to  should first be routed through a firewall  , and then through a wan optimizer , before eventually reaching  : the operator can do so by defining a service chain .* a motivating example .* let us consider a more detailed example , see the network in figure [ fig : sc ] : the network hosts two types of ( virtualized ) functions and  : possible network functions may include , e.g. , a firewall , a nat , a proxy , a tunnel endpoint , a wan optimizer ( and its counterpart ) , a header decompressor , etc . in this example , function  is instantiated at two locations .functions  and  may not be flow - preserving , but may _ decrease _ the traffic rate ( e.g. , in case of a proxy , wan optimizer , etc . ) or _ increase _ it : e.g. , a tunnel entry - point may add an extra header , a security box may add a watermark to the packet , the counterpart of the wan optimizer may decompress the packet , etc .links come with a certain cost ( say latency ) and a certain capacity ( in terms of bandwidth ) .accordingly , we may annotate links with two weights : the tuple  denotes that the link cost is 2 and the link capacity 3 .we would like to be able to ask questions such as : _ can source  emit traffic into the service chain at rate  without overloading the network ? _ or _ can we embed a service chain of cost ( e.g. , end - to - end latency ) at most ?_.  * contributions .* this paper initiates the study of weighted network languages for programming and reasoning about sdn networks , which go beyond topological aspects but account for actual resource availabilities , capacities , or costs .in particular , we present  , an extension of the _ netkat _  algebra .  for example ,  supports a natural generalization of the reachibility concepts used in classic network programming languages , such as _ cost - aware _ or _ capacity - aware reachability_. in particular ,  allows to answer questions of the form : _ can host  reach host  at cost / bandwidth / latency  ? _  we demonstrate applications of  for a number of practical use cases related to performance , quality - of - service , fairness , and costs .these applications are not only useful in the context of both splittable and unsplittable routing models , where flows need to travel from a source to a destination  , but also in the context of more complex models with waypointing requirements ( e.g. , service chains ) .the weighted extension of netkat is non - trivial , as capacity constraints introduce dependencies between flows , and arithmetic operations such as _ addition _ ( e.g. , in case of latency ) or _ minimum _ ( e.g. , in case of bandwidth to compute the end - to - end delay ) have to be supported along the paths .therefore , we extend the syntax of netkat toward weighted packet- and switch - variables , as well as queues , and provide a semantics accordingly .in particular , one contribution of our work is to show for which weighted aspects and use cases which language extensions are required .we also show the relation between wnetkat expressions and weighted finite automata  an important operational model for weighted programs .this leads to the undeciability of wnetkat equivalence problem .however , leveraging this relation we also succeed to prove the decidability of whether an expression equals to 0 : for many practical scenarios a sufficient and relevant solution .moreover , this paper initiates the discussion of identifying decidable subsets of the whole language .* related work .* most modern domain - specific sdn languages enable automated tools for verifying network properties  .especially reachability properties , which are also the focus in our paper , have been studied intensively in the literature  .indeed , the formal verifiability of the openflow match - action interface  constitutes a key advantage of the paradigm over previous innovation efforts  .existing expressive languages use sat formulas  , graph - based representations  , or higher - order logic  to describe network topologies and policies .our work builds upon netkat , a new framework based on kleene algebra with tests for specifying , programming , and reasoning about networks and policies .netkat respresents a more principled approach compared to prior work , and is also motivated by the observation that end - to - end functionality is determined not only by the behavior of the switches and but also by the structure of the network topology .netkat in turn is based on earlier efforts performed in the context of netcore  , pyretic  and frenetic  .it has recently been extended to a probabilistic setting  .the kleene algebra with tests was developed by kozen  .  however , to the best of our knowledge , there is prior work on weighted versions of netkat .* organization . *the rest of this paper is organized as follows .section [ sec : background ] provides the necessary background on sdn and netkat .section [ sec : wnetkat ] introduces  , our weighted version of netkat .section [ sec : applications ] demonstrates the usefulness of our extensions in a number of applications .section [ sec : deci ] and section [ sec : compilation ] discuss complexity and implementation aspects .section [ sec : conclusion ] concludes our contribution .we first provide a more detailed introduction to openflow , and then describe the programming language netkat , which compiles to openflow .* sdn and openflow . * a software - defined network ( sdn ) outsources and consolidates the control over data plane elements to a logically centralized control plane implemented in software .arguably , software - defined networking in general , and its de facto standard , openflow , are about programmability , verifiability and generality  : a software - defined network allows programmers to write network applications ( for example for traffic engineering ) in software .the behavior of an openflow switch is defined by its configuration : a list of prioritized _ ( flow ) rules _ stored in the switch flow table , which are used to classify , filter , and modify packets based on their _ header fields_. in particular , openflow follows a simple match - action paradigm : the match parts of the flow rules ( expressed over the header fields ) specify which packets belong to a certain flow ( e.g. , depending on the ip destination address ) , and the action parts define how these packets should be processed ( e.g. , forward to a certain port ) .openflow supports a rather general packet processing : it allows to match and process packets based on their layer-2 ( e.g. , mac addresses ) , layer-3 ( e.g. , ip addresses ) , and layer-4 header fields ( e.g. , tcp ports ) , or even in a protocol - independent manner , using arbitrary bitmasking  .for example , an openflow router may forward packets destined to http ports differently from traffic destined to ftp ports . in other words ,an openflow switch blurs the difference between switches and routers ( the two terms are used interchangeably in this paper ) , and even supports some basic middlebox functionality .openflow also readily supports quantitative aspects , e.g. , the selection of queues annotated with different round robin weights ( the standard approach to implement quality - of - service guarantees in networks today ) , or meters ( measuring the bandwidth of a flow ) .moreover , we currently witness a trend toward more flexible and stateful programmable switches and packet processors , featuring group tables , counters , and beyond  .* netkat . * the formal framework developed in this paper is based on netkat  . herewe briefly review the main concepts underlying netkat , and discuss how they relate to openflow .netkat is a high - level algebra for reasoning about network programs .it is based on _ kleene algebra with tests ( kat ) _ , and uses an equational theory combining the axioms of kat and network - specific axioms that describe transformations on packets ( as performed by openflow switch rules ) .these axioms facilitate reasoning about local switch processing functionality ( needed during compilation and for optimization ) as well as global network behavior ( needed to check reachability and traffic isolation properties ) . basically , an atomic netkat policy ( a function from packet headers to sets of packet headers : essentially the per - switch openflow rules discussed above ) can be used to filter or modify packets .policy combinators ( ) allow to build larger policies out of smaller policies .there is also a sequential composition combinator to apply functions consecutively .besides the _ policy _ , modeling the per - switch openflow rules , a network programming language needs to be able to describe the network_ topology_. netkat models the network topology as a directed graph : nodes ( hosts , routers , switches ) are connected via edges ( links ) using ( switch ) _ports_. netkat simply describes the topology as the union of smaller policies that encode the behavior of each link . to model the effect of sending a packet across a link, netkat employs the sequential composition of a filter that retains packets located at one end of the link , and a modification that updates the switch and port fields to the location at the other end of the link .note that the netkat topology and the netkat policy are hence to be seen as two independent concepts . succinctly :  a _ kleene algebra _( ka ) is any structure  , where  is a set ,  and  are binary operations on  ,  is a unary operation on  , and  and  are constants , satisfying the following axioms , where we define  iff  .+    a _ kleene algebra with tests _ ( kat ) is a two - sorted structure  , where  and +  is a kleene algebra ; +  is a boolean algebra ; +  is a subalgebra of  .the elements of  are called _tests_. the axioms of boolean algebra are : +    netkat is a version of kat in which the atoms ( elements in ) are defined over header fields  ( variables ) and values  : +  ( `` assign a value  to header field  '' ) +  ( `` test the value of a header field '' ) + ( `` duplicate the packet '' )  the set of all possible values of is denoted . for readability ,we use  and  to denote  and  , respectively .the netkat axioms consist of the following equations , in addition to the kat axioms on the commutativity and redundancy of different actions and tests , and enforcing that the field has exactly one value : +    in terms of semantics , netkat uses _ packet histories _ to record the state of each packet on its path from switch to switch through the network .the notation is used to describe a history with elements  being packets ; is used to denote a history with one element and  to denote the history constructed by prepending  on to  . by convention ,the first element of a history is the current packet ( the `` head '' ) .a netkat expression denotes a function , where  is the set of packet histories .histories are only needed for reasoning : policies only inspect or modify the first ( current ) packet in the history . succinctly : +  ::h\}\\ \llbracket f=\omega\rrbracket(pk::h)&=&\left\{\begin{array}{lcl } \{pk::h\}&\phantom{ef}&\text{if } pk(f)=\omega\\\emptyset&&\text{otherwise } \end{array}\right.\\ \llbracket\text{\small\sf dup}\rrbracket(pk::h)&=&\{pk::pk::h\}\\ \llbracket p+q\rrbracket(h)&=&\llbracket p\rrbracket(h)\cup\llbracket q\rrbracket(h)\\ \llbracket pq\rrbracket(h)&=&\bigcup_{h'\in\llbracket p\rrbracket(h)}{\llbracket q\rrbracket(h')}\\ \llbracket p^\ast\rrbracket(h)&=&\bigcup_{n}{\llbracket p^n\rrbracket(h)}\\ \llbracket 0\rrbracket(h)&=&\emptyset\\ \llbracket 1\rrbracket(h)&=&\{h\}\\ \llbracket\overline{a}\rrbracket(h)&=&\left\{\begin{array}{lcl } \{h\}&\phantom{ef}&\text{if } \llbracket a\rrbracket(h)=\emptyset\\\emptyset&&\text{if } \llbracket a\rrbracket(h)=\{h\ } \end{array}\right .\end{array}$ ]  consider the network in figure [ fig : sc ] .netkat can be used to specify the topology as follows , where the field  stores the current location ( switch ) of the packet : +    the first line of the above netkat expression specifies that if the packet is at  , then it will be sent to  or  .analogously for the other cases . in openflow, this policy can be implemented using openflow rules , whose match part applies to packets arriving at , and whose action part assigns the packets to the respective forwarding ports .  however , one can observe that with netkat it is not possible to specify or reason about the important quantitative aspects in figure [ fig : sc ] , e.g. , the cost and capacity along the links or the function of which changes the rate of the flow .to do these , a weighted extension of netkat is needed .on a high level , a computer network can be described as a set of nodes ( hosts or routers ) which are interconnected by a set of links , hence defining the network topology . while this high - level view is sufficient for many purposes , for example for reasoning about reachability , in practice , the situation is often more complex : both nodes and links come with capacity constraints ( e.g. , in terms of buffers , cpu , and bandwidth ) and may be attributed with costs ( e.g. , monetary or in terms of performance ) . in order to reason about performance , cost , and fairness aspects , it is therefore important to take these dimensions into account.  the challenge of extending netkat to weighted scenarios lies in the fact that in a weighted network , traffic flows can no longer be considered independently , but they may _ interfere _ : their packets compete for the shared resource .moreover , packets of a given flow may not necessarily be propagated along a unique path , but may be split and distributed among multiple paths ( in the so - called _ multi - path routing _ or _ splittable flow _variant ) .accordingly , a weighted extension of netkat must be able to deal with `` inter - packet states '' .we in this paper will think of the network as a weighted ( directed ) graph  . here ,  denotes the set of switches ( or equivalently routers , and henceforth often simply called nodes ),  is the set of links ( connected to the switches by _ ports _ ) , and is a weight function .the weight function  applies to both nodes  as well as links  .moreover , a node and a link may be characterized by _ a vector of weights _ and also combine _ multiple resources _ : for example , a list of capacities ( e.g. , cpu and memory on nodes , or bandwidth on links ) and a list of costs ( e.g. , performance , energy , or monetary costs ) .  in order to specify the quantitative aspects , we propose in this paper a weighted extension of netkat : .in addition to netkat :  * includes a set of _ quantitative packet - variables _ to specify the quantitative information carried in the packet , in addition to the regular ( non - quantitative ) packet - variables of netkat ( called _ fields _ in netkat ) : e.g. , regular variables are used to describe locations , such as switch and port , or priorities , while quantitative variables are used to specify latency or energy .the set of all packet - variables is denoted by .* also includes a set of _ switch - variables _ , denoted by  , to specify the configurations at the switch .switch variables can either be quantitative ( e.g. , counters , meters , meta - rules  ) or non - quantitative ( e.g. , location related ) , as it is the case of the packet - variables ._ remarks : _ the set of quantitative ( packet- and switch- ) variables is denoted by and these variables range over the natural numbers  ( e.g. , normalized rational numbers ) .the set of non - quantitative ( packet- and switch- ) variables is denoted and the set of the possible values is denoted .note that  and  .  in addition to introducing quantitative variables , we also need to extend the atomic actions and tests of netkat .concretely ,  first supports non - quantitative assignments and non - quantitative tests on the non - quantitative switch - variables , similar to those on the packet - variables in netkat .moreover , also allows for _ quantitative assignments _ and _ quantitative tests _ , defined as follows , where  , ,  ,  :  * * quantitative assignment *  : read the current values of the variables in  and add them to  , then assign this result to  . * * quantitative test *  : read the current value of the variables in  and add them to  , then compare this result to the current value of  .  _remarks : _ 1 . in the quantitative assignment and test , only addition is allowed .however , an extension to other arithmetic operations ( e.g. , linear combinations ) is straightfoward .moreover , calculating _ minimum _ or _ maximum _ may be useful in practice : e.g. , the throughput of a flow often depends on the weakest link ( of minimal bandwidth ) along a path .note that these operations can actually be implemented with quantitative assignments and tests , i.e. , by comparing every variable to another and determining the smallest .e.g. , for and  or  , +     + 2 . in quantitative assignment and test, might be in .we use  to denote the arithmetic operation over numbers .therefore , we will use  " in  to denote the " operator of kleene algebra , which is also used in  .  given the set of switches , a _ switch - variable valuation _ is a partial function . it associates , for each switch and each switch - variable , a integer or a value from  .we emphasize that  is a partial function , as some variables may not be defined at some switches .a _ wnetkat_expression denotes a function , where  is the set of packet histories .the semantics of  is defined in table [ sem-1 ] , where ,  and  .::h\}&\phantom{ef}&\text{if } x\in{\mathcal{v}}_p \\ \{\rho(v)[\omega / x],\ pk::h\}&&\text{if } x\in{\mathcal{v}}_s\text { and } pk(sw)=v \\ \end{array } \right .\hfill ( 1 )  \\  \\\llbracket x=\omega\rrbracket(\rho,\ pk::h)&=&\left\{\begin{array}{lcl } \{\rho,\ pk::h\}&\phantom{ef}&\text{if } x\in{\mathcal{v}}_p\text { and } pk(x)=\omega \\ & \phantom{ef}&\text { or if } x\in{\mathcal{v}}_s , pk(sw)=v\text { and } \rho(v , x)=\omega \\ \emptyset&&\text{otherwise } \end{array}\right .\hfill ( 2 ) \\ \\\llbracket y\leftarrow ( \displaystyle\sigma_{y'\in{\mathcal{v}}'}{y'}+r)\rrbracket(\rho,\ pk::h)&\phantom{e}=\phantom{e}&\left\{\begin{array}{lcl } \{\rho,\ pk[r'/x]::h\}&\phantom{ef}&\text{if } x\in{\mathcal{v}}_p \\\{\rho(v)[r'/x],\ pk::h\}&&\text{if } x\in{\mathcal{v}}_s\text { and } pk(sw)=v \\ \end{array } \right.\hfill ( 3)\\ & \multicolumn{2}{l}{\text{where } r'=\sigma_{y_p\in{\mathcal{v}}'\cap{\mathcal{v}}_p}pk(y_p)+\sigma_{y_s\in{\mathcal{v}}'\cap{\mathcal{v}}_q}\rho(v , y_s)+r } \\ \\\llbracket y=(\sigma_{y'\in{\mathcal{v}}'}{y'}+r)\rrbracket(\rho,\ pk::h)&=&\left\{\begin{array}{lcl } \{\rho,\ pk::h\}&\phantom{ef}&\text{if } x\in{\mathcal{v}}_p\text { and } pk(x)=r'\\ & \phantom{ef}&\text { or } x\in{\mathcal{v}}_s , pk(sw)=v\text { and } \rho(v , x)=r'\\ \emptyset&&\text{otherwise } \end{array}\right .\hfill ( 4)\\ & \multicolumn{2}{l}{\text{where } r'=\sigma_{y_p\in{\mathcal{v}}'\cap{\mathcal{v}}_p}pk(y_p)+\sigma_{y_s\in{\mathcal{v}}'\cap{\mathcal{v}}_q}\rho(v , y_s)+r } \end{array}\ ] ]  _ remarks : _ equations ( 1 ) and ( 3 ) update the corresponding header field if  is a packet - variable , or they update the corresponding switch information of the current switch if  is a switch - variable .equation ( 1 ) updates the non - quantitative variables and equation ( 3 ) the quantitative ones . equations ( 2 ) and ( 4 ) test the non - quantitative and quantitative variables respectively , using the current packet- and switch - variables .  [ exm - sem ] consider again the network in figure [ fig : sc ] .the topology of the network can be characterized with the following  formula  , where  specifies the current location ( switch ) of the packet ,  specifies the cost , and  specifies the capacity along the links .  the variable  accumulates the costs along the path , and the variable  records the smallest capacity along the path .notice that  is just a packet - variable used to record the capacity of the path ; it does not represent the capacity used by this packet ( the latter is assumed to be negligible ) .assume that function  is flow conserving ( e.g. , a nat ) , while increases the flow rate by an additive constant ( e.g. , a security related function , adding a watermark or an ipsec header ) .the policy of can be specified as :     _ remarks : _ note that this simple example required only ( non - quantitative and quantitative ) packet - variables .however , as we will see in section [ sec : applications ] , to model more complex aspects of networking , such as splittable flows , additonal concepts of will be needed .the weighted extensions introduced by  come with a number of interesting applications . in this section , we show that the notions of reachability frequently discussed in prior work , find natural extensions in the world of weighted networks , and discuss applications in the context of service chains , fairness , and quality - of - service . in the appendix ,additional details are provided for some of these use cases .especially data center networks but also wide - area networks , and to some extent enterprise networks , feature a certain _ path diversity _ : there exist multiple routes between two endpoints ( e.g. , hosts ) .this path diversity is not only a prerequisite for fault - tolerance , but also introduces traffic engineering flexibilities .in particular , different paths or routes depend on different links , whose cost can vary . for example , links may be attributed with monetary costs : a peering link may be free of charge , while an up- or down - link is not .links cost can also be performance related , and may for example vary in terms of latency , for example due to the use of different technologies  , or simply because of different physical distances .the monetary and performance costs are often related : for example , in the context of stock markets , lower latency links come at a higher price  .it is therefore natural to ask questions such as : _ `` can a reach b at cost at most ?''_. we will refer to this type of questions as _ cost reachability questions_.  [ exm - cr ] consider the network in figure [ fig : b4 ] .the topology roughly describes the north american data centers interconnected by google b4 , according to  .= [ fill = white , draw , text = black ] = [ thick , decoration = markings , mark = at position 1 with , double distance=1.4pt , shorten > = 5.5pt , preaction = decorate , postaction = draw , line width=1.4pt , white , shorten > = 4.5pt ] = [ semithick , white , line width=1.4pt , shorten > = 4.5pt ] ( dc1 ) at ( 0,0 ) ; at ( 0.55,0.1 )  ; at ( 0.15,-0.55 )  ;  ( dc2 ) at ( 2,-.5 ) ; at ( 2.54,-0.6 )  ; at ( 2.12,-0.78 )  ; at ( 1.85,-0.98 )  ; at ( 1.45,-0.55 )  ;  ( dc3 ) at ( 2,-2 ) ; at ( 2.3,-2.48 )  ; at ( 2.15,-1.47 )  ;  ( dc4 ) at ( 2.5,-4 ) ; at ( 2.05,-3.65 )  ; at ( 2.5,-3.42 )  ; at ( 2.95,-3.65 )  ; at ( 2.85,-4.4 )  ;  ( dc5 ) at ( 6,-3 ) ; at ( 5.8,-3.55 )  ; at ( 5.45,-2.95 )  ; at ( 5.6,-2.56 )  ;  ( dc6 ) at ( 4.5,-5 ) ; at ( 3.95,-4.92 )  ; at ( 4.35,-4.45 )  ; at ( 4.95,-4.7 )  ;  ( dc1 ) ( dc2 ) ; at ( 1,-0.25 ) ;  ( dc2 ) ( dc3 ) ; at ( 2,-1.25 ) ;  ( dc3 ) ( dc4 ) ; at ( 2.25,-2.9 ) ;  ( dc1 ) ( dc4 ) ; at ( 1.2,-2 ) ;  ( dc2 ) ( dc5 ) ; at ( 4.1,-1.75 ) ;  ( dc2 ) ( dc6 ) ; at ( 3.35,-2.75 ) ;  ( dc4 ) ( dc5 ) ; at ( 4.15,-3.5 ) ;  ( dc4 ) ( dc6 ) ; at ( 3.57,-4.5 ) ;  ( dc5 ) ( dc6 ) ; at ( 5.25,-4.15 ) ;  in order to reason about network latencies , we not only need information about the switch at which the packet is currently located ( as in our earlier examples ) , but also the _ port of the switch _ needs to be specified .we introduce the packet - variable  .we can then specify this network topology in  .the link from  to  ( latency  units ) represented by the port  at and the port  at  is specified as follows , where we use packet - variable  to denote the current switch , to specify the current port , and  to specify the latency of the path the packet traverses ,    analogously , the entire network topology can be modeled with  , henceforth denoted by  .the policy of the network determines the functionality of each switch ( the openflow rules ) , e.g. , in  , packets from to arriving at port  are always sent out through port  or port  .this can be specified as : +    analogously , the entire network policy can be modeled with  , henceforth denoted by  .  to answer the cost reachability question, one can check whether the following  expression is equal to  .+    if it is equal to  , then  can not be reached from  at latency at most  ; otherwise , it can .  _ remarks : _ for ease of presentation , in the above example , we considered only one weight .however , readily supports multiple weights : we can simply use multiple variables accordingly .moreover , while the computational problem complexity can increase with the number of considered weights  , the multi - constrained path selection does not affect the general asymptotic complexity of .   especially in the wide - area network , but also in data centers , link capacities are a scarce resource : indeed , wide - area traffic is one of the fastest growing traffic aggregates  . however , also the routers themselves come with capacity constraints , both in terms of memory ( size of tcam ) as well as cpu : for example , the cpu utilization has been shown to depend on the packet rate  . accordingly , a natural question to ask is : _ can a communicate at rate at least  to b ? _ we will refer to this type of questions as _ capacitated reachability questions_.  there are two problem variants :  * _ unsplittable flows : _ the capacity needs to be computed along a single path ( e.g. , an mpls tunnel ) . * _ splittable flows : _ the capacity needs to be computed along multiple paths ( e.g. , mptcp , ecmp ) .we will assume links of higher capacity are chosen first .  for both variants , to find out the capacity of paths between two nodes , a _test packet will be sent to explore the network and record the bandwidth / capacity with a packet - variable in the packet .we assume that the bandwidth consumed by this packet is negligibile .also , only once the packet has traversed and determined the bandwidth , e.g. , the actual ( large ) flows are allocated accordingly ( by the sdn controller ) .consider the network in figure [ fig : b4 ] again , but assume that the labels are the capacities rather than latency .* unsplittable flow scenario : * the switch policies are exactly the same as in example [ exm - cr ] , while the topology will be specified similarly using packet - variable  to record the capacity of the link .e.g. , the link between  and  can be specified as : +    the unsplittable capacitated reachability question can be answered by checking whether the following expression is equal to  , +    if the above formula does not equal  , then  can communicate at rate at least  to  .another ( possibly ) more efficient approach is not to update  while the bandwidth is smaller than  ( meaning that a flow of size  can not go through this link ) . in this case , one can specify the topology as follows , where  is not used to record the capacity along the path anymore , but rather to test whether this link is wide enough : +    the above  expression only tests whether  is less than or equal to  .it makes sure that the value of  ( which is  ) does not exceed the capacity of the following link .if it exceeds the capacity of the link , then a flow of rate  can not use this link .therefore , the test packet is dropped already . the capacitated reachability questioncan then be answered by checking whether the following expression is equal to  : +    if the above formula does not equal  , then  can communicate at rate at least  to  .* splittable flow scenario : * for the splittable scenario , the situation is far more complicated .for example , in  , packets arriving at port  are sent out through port  or port  , and port  prioritizes port  .that is , if the incoming traffic has rate  , then a share of units will be sent out through port  , and a  share through port  . notethat also here , still only one _ single _ test packet will be sent to collect the capacity information .this information will be stored in the packet - variable  as well . however ,when the test packet arrives at a switch where a flow can be split , copies of the packet are sent ( after updating the  according to the bandwidth of each path ) to all possible paths , to record the capacity along all other paths .this exploits the fact that  ( netkat ) treats the  operator as _ conjunction _ in the sense that both operations are performed , rather than _ disjunction _ , where one of the two operations would be chosen non - deterministically ( according to the usual kleene interpretation ) .again , we emphasize that we will refer to  stored in one _ single _ test packet , and not the actual real data flow . nowthe topology will update as in the unsplittable case .however , the policy needs to not only decide which ports the packets go to , but also update  according to the split policy .e.g. , , at  , the data flow from  to  at rate  is sent out through port  at rate  , and the port  at  . andif the rate is smaller than or equal to  , e.g. ,  , then the whole flow of rate  will be sent out through port  .the following  formula specifies this behavior : +    the test  ensures that the flow does not exceed the capacity of both paths .notice that even when the size of the flow is small enough for one path , a copy of the test packet with  will still be sent to the other .this ensures that sufficient information is available at the switch where flows merge .that is , the switch collects the weights the packets carry ( in our example ) .the switch will only push packets to the right out - ports after all expected packets have arrived .this will happen before the switch sends the packet to the right out - ports .for example , at  , the flow from  to  might arrive in from ports  and  and will be sent out through port  . in order to record the capacity of both links , switch - variables  and  introduced , for each possible merge .for example , the following table provides the merging rules for the switch at  , where  is the counter for the merge , and  stores the current capacity of the arriving test packets .initially ,  is set to the number of in - ports for the merge , and  is set to 0 .  the first line of the rules in the table can be specified in  as follows :     when a packet from  to  arrives at port  or  of  , first the switch collects the value of  and adds it to the switch - variable  , then decrements  to record that one packet arrived .afterwards , we test whether all expected packets arrived ( ) . if not , the current one is dropped ; if yes , we send the current packet out to port  .the reason that we can drop all packets except for the last , is that all those packets carry exactly the same values .therefore , we eventually only need to include the merged capacity ( ) in the last packet , and propagate it .  combining the split and merge cases , the policy of the switch can be defined .for example , the second line of the merging rule table can be specified as follows , by first merging from port  and  , and then splitting to port  and  :    then the splittable capacited reachability question can be answered by checking whether the following expression evaluates to  : +    if the above formula does not equal  , then  can communicate at rate at least  to  .the virtualization and programmability trend is not limited to the network , but is currently also discussed intensively for network functions in the context of the network function virtualization ( nfv ) paradigm .sdn and nfv nicely complement each other , enabling innovative new network services such as _ service chains _ : network functions which are traversed in a particular order ( e.g. , first firewall , then cache , then wide - area network optimizer ) .our language allows to reason about questions such as _ are sequences of network functions traversed in a particular order , without violating node and link capacities ? _ can easily be used to describe weighted aspects also in the context of service chains .in particular , network functions may both _ increase _( e.g. , due to addition of an encapsulation header , or a watermark ) or _ decrease _ ( e.g. , a wan optimizer , or a cache ) the traffic rate , both _ additively _( e.g. , adding a header ) or _ multiplicatively _ ( e.g. , wan optimizer ) .let us go back to figure [ fig : sc ] , and consider a service chain of the form  : traffic from to  should first traverse a function  and then a function  , before reaching  .for example ,  may be a firewall or proxy and  is a wan optimizer .the virtualized functions  and may be allocated redundantly and may change the traffic volume . using  , we can ask questions such as : _ what is the maximal rate at which  can transmit traffic into the service chain ? _ or _ can we realize a service chain of cost ( e.g. , latency ) at most ?_. let us consider the following example : the question _ `` can  reach  at cost / latency at most  and/or at rate / bandwidth at least  , via the service chain functions  and  ? '' _ , can be formulated by combining the reachability problems above and the waypointing technique in  .for example , in case of cost reachability , we can ask if the following  formula equals  . +    note that in this example , we considered an unsplittable scenario . for the splittable scenario, we can extend the splittable capacitated reachability use case above analogously .related to quality - of - service is the question of fairness .for example , a natural question to ask is : _ `` does the current flow allocation satisfy network neutrality requirements ? '' _ , or more specifically , _`` is the network max - min fair ? '' _  for example , consider the network in figure [ fig - fair ] .the numbers on the links specify the bandwidth capacity .suppose that there are three flows :  embedded in this network .suppose the rates of these three flows are  , respectively . in a max - min fair allocation ,we aim to maximize the minimal flow allocated to any of these three flows , subject to capacity constraints .for example , the minimum flow receives a fair share here : the flow is naturally limited by the first link of capacity 1 .however , the next smallest rate , , may be increased to , by reducing the flow accordingly .= [ fill = white , draw , text = black ] = [ thick , decoration = markings , mark = at position 1 with , double distance=1.4pt , shorten > = 5.5pt , preaction = decorate , postaction = draw , line width=1.4pt , white , shorten > = 4.5pt ] = [ semithick , white , line width=1.4pt , shorten > = 4.5pt ] ( s1 ) at ( 0,0 ) ; ( s2 ) at ( 0,-2 ) ; ( b1 ) at ( 2,-1 ) ; ( b2 ) at ( 4.3,-1 ) ; ( e1 ) at ( 6.3,0 ) ; ( e2 ) at ( 6.3,-2 ) ; ( s1 ) edge node[midway , above ] ( b1 ) ( s2 ) edge node[midway , above ] ( b1 ) ( b1 ) edge node[midway , above ] ( b2 ) ( b2 ) edge node[midway , above ] ( e1 ) edge node[midway , above ] ( e2 ) ; ( pt1 ) at ( 0.5,-0.1 ) _ 1 _ ; ( pt1 ) at ( 1.63,-0.63 ) _ 1 _ ; ( pt2 ) at ( 0.5,-1.9 ) _ 1 _ ; ( pt2 ) at ( 1.58,-1.4 ) _ 2 _ ; ( pt3 ) at ( 2.48,-1.15 ) _ 3 _ ; ( pt3 ) at ( 3.75,-1.15 ) _ 1 _ ; ( pt4 ) at ( 4.72,-0.65 ) _ 2 _ ; ( pt5 ) at ( 4.69,-1.38 ) _ 3 _ ; ( pt4 ) at ( 5.77,-0.09 ) _ 1 _ ; ( pt5 ) at ( 5.78,-1.93 ) _ 1 _ ;  consider the network and the flows mentioned earlier in figure [ fig - fair ] . in order to specify whether the given rates for the flows are max - min fair , we send three test packets along the three flows respectively .the topology of this network can be specified in  as before , which only takes care of forwarding packets .e.g. , the link between  and  is specified as follows , where  specifies the capacity : +    the switches not only put incoming packets to the right outgoing ports , but also assign the bandwidth of the out - going links to different flows .this will be recorded in the test packets as a packet - variable , denoted by  .moreover , three packet - variables  are used to represent the rates of the flows that are supposed to be checked for max - min fairness .e.g. , the policy of  can be specified as follows .+    the first line specifies that the packets arriving at port  or  will be sent out through port  .the following lines update  of the test packets , according the rates of the flows that share the link . in order to test max - min fairness , we first order the given rates increasingly . for example , to check whether the following flow rates are max - min fair , +    we represent them as  . then , we check them one - by - one , by verifying whether the following  expressions are equal to  or not .+    while checking whether  is max - min fair , one does not need to consider  ( can be modified if not fair ) , because  is the minimum ; therefore ,  are set to  .while checking  , it is already known that  is fair .therefore the value of  can not be changed even if  is not fair ; this is why  is set to  , and  is  in  .similarly for  .  if all of the above formulas are not equal to drop , then the given rates are max - min fair .e.g. , the above rates  are not max - min fair because  equals  .this matches our discussion above .  moreover , the results of the above tests can also help develop more fair rates .e.g. ,  is the first list entry to equal  , this means that  is not fairly allocated .however ,  must be fair as does not equal  .therefore , to ensure max - min fairness in this network , one should keep the rate of the flow  , and adjust the rate of  and that of  .we have already shown how to specify and reason about a number of relevant use cases for weighted networks .an additional important motivation for weighted models concerns the ability to express and verify _ quality - of - service _ guarantees .for example , in a computer network ( providing limited resources ) , it can be useful to prioritize a certain flow ( e.g. , a voip call ) over another ( e.g. , a dropbox synchronization ) .[ exm - qos ] consider the switch in figure [ fig - qos ] .= [ fill = white , draw , text = black ] = [ thick , decoration = markings , mark = at position 1 with , double distance=1.4pt , shorten > = 5.5pt , preaction = decorate , postaction = draw , line width=1.4pt , white , shorten > = 4.5pt ] = [ semithick , white , line width=1.4pt , shorten > = 4.5pt ] ( s1 ) at ( 0,0 ) ; ( s2 ) at ( 0,-2 ) ; ( b1 ) at ( 2,-1 ) ; ( b2 ) at ( 4.3,-1 ) ;  ( s1 ) edge node[midway , above ] ( b1 ) ( s2 ) edge node[midway , above ] ( b1 ) ( b1 ) edge node[midway , above ] ( b2 ) ;  ( pt1 ) at ( 1.6,-0.65 ) _ 1 _ ; ( pt2 ) at ( 1.56,-1.38 ) _ 2 _ ; ( pt3 ) at ( 2.5,-1.15 ) _ 3 _ ;  \(x ) at ( 2,-1.8 ) ;  it has two incoming ports and one outgoing port .suppose there are two types of traffic flows going through this switch : skype calls and web surfing traffic .this switch should respect that the skype calls have higher priority , but at the same time not completely disallow the web surfing .suppose we want to give skype calls 80% of the bandwidth and to web surfing only 20% .this policy can be easily specified with  the following _ wnetkat _ expression , where is a packet - variable specifying the priority of the packet ( e.g. , skype has high priority and http low ) and are two switch - variables for counting the number of packets with the two priorities respectively .+    the second line deals with high priority packets : if the amount of the packets with this priority is less than , then it will be sent out through port .similar for the low priority packets .the last line resets to when both reach the upper limit , triggering a new round of counting .   while , using switch - variables ( e.g. , as counters ) , supports a basic form of prioritization , allowing to provide one flow with a larger share of the bandwidth than another , this solution is still naive .for example , when a skype packet arrives at switch and is already , then this packet will be dropped , which might lower the quality of the skype call . in a even worse situation , in the absence of web traffic packets , the switch will still wait and drop all the incoming skype packets . to overcome these problems and improved notion of quality - of - service ,we could introduce a notion of _ queue_. indeed , queues , e.g. , annotated with different round robin weights , are an essential component in any computer network today , and are also the predominant mechanism to implement service differentiation .however , while openflow actions can readily be used to _ enqueue _ a packet in a certain queue ,it is the responsibility of the management plane ( and not the sdn control plane ) to actually allocate these queues and scheduling policies .while we currently witness first attempts to combine control and management planes  , today , there does not exist any standard .nevertheless , we in the following start exploring how  could be extended with a notion of queues .concretely , we can extend  by a set of queues , henceforth denoted by  , which are used for buffering packets which currently can not be forwarded due to limited resources .we will assume that all queues are fifo with normal queue related functions , e.g. , enqueue ( ) , dequeue ( ) , head of queue ( ) , etc .  for specifying the queue operations ,we extend  to allow _ enqueue _ and _ dequeue _ , where  :  * * enqueue *  : put the current packet into the queue  .the packet remains in the queue until being processed by the switch .* * dequeue *  : dequeue the first packet from the queue  and delete it from the queue .the semantics are defined in table [ sem-2 ] , for  .  _ remarks : _ equations ( 5 ) and ( 6 ) deal with the queues at the switches , by taking care of the detailed queue processing .notice that each switch can only manage its own queues .  consider the same switch in example [ exm - qos ] .= [ fill = white , draw , text = black ] = [ thick , decoration = markings , mark = at position 1 with , double distance=1.4pt , shorten > = 5.5pt , preaction = decorate , postaction = draw , line width=1.4pt , white , shorten > = 4.5pt ] = [ semithick , white , line width=1.4pt , shorten > = 4.5pt ] ( s1 ) at ( 0,0 ) ; ( s2 ) at ( 0,-2 ) ; ( b1 ) at ( 2,-1 ) ; ( b2 ) at ( 4.3,-1 ) ;  ( s1 ) edge node[midway , above ] ( b1 ) ( s2 ) edge node[midway , above ] ( b1 ) ( b1 ) edge node[midway , above ] ( b2 ) ;  ( pt1 ) at ( 1.6,-0.65 ) _ 1 _ ; ( pt2 ) at ( 1.56,-1.38 ) _ 2 _ ; ( pt3 ) at ( 2.5,-1.15 ) _ 3 _ ;  \(y ) at ( 2,-0.3 ) ; ( x ) at ( 2,-1.8 ) ;  however , there are two queues at the switch for high priority packets ( e.g. , skype packets ) and low priority ( e.g. , http packets ) packets respectively .different from example [ exm - qos ] , when a packet arrives at the switch , it will be put into the right queue first .this can be specified using the following , where is the packet - variable representing the priority .  moreover , the switch also makes sure that the high priority queue is processed 80% of the time and the low priority queue 20% of the time .the following expression shows the case of high priority packets .+    the second line specifies that when is less than , we take the first packet of the high priority queue and send it through port .this is similar to non - queue case .the third line specifies the situation when already reached its upper limit , meaning that the high priority packets already used up the bandwidth assigned for them .however , the low priority queue is empty , i.e. , there is no low priority packet that needs to use the link .therefore , in this case , the high priority packets can use the low priority packets share .the fourth line specifies the case that the high priority packets already used up their share and need to wait for the low packets to go first .the last line tests whether the counters both reach their upper limit and if yes , reset both of them .related to the quality - of - service discussion above is also the question of how to model entire flows competing for a _ set _ of shared resources ( e.g. , along paths ) .while so far , all our use cases have been described in terms of packet and switch variables only , these concepts are insufficient to model contention across multiple resources .  in principle , it is simple to extend  with a notion of global variables which allows to account for such more global aspects . in practice however , supporting global variables can be inefficient : such variables can not be maintained by the switch , but require interactions with the controller .the latter introduces network loads and latencies , which can be undesirable , especially in wide - area network where the controller can be located remotely .in this section we shed light on the fundamental decidability of weighted sdn programming languages like wnetkat .given today s trend toward more quantitative networking , we believe that this is an important yet hardly explored dimension . in particular , we will establish an equivalence between wnetkat and weighted automata .  in the following, we will restrict ourselves to settings where quantitative variables of the same type behave similarly in the entire network : for example , the cost variables ( e.g. , quantifying latencies ) in the network are always added up along a given path , while capacity variables require minimum operations along different paths .this is a reasonable for real - world networks .the definition of the weighted automata used here is slightly different from those usually studied , e.g. ,  .however , it is easy to see that they are equivalent .we first introduce some preliminaries .a _ semiring _ is a structure , where is a commutative monoid , is a monoid , multiplication distributes over addition , and for each . for example , and are semirings , named the _tropical semiring_. is also a semiring .bimonoid _ is a structure , where and are monoids . is called a _ strong bimonoid _ if is commutative and for each .for example , is a ( strong ) bimonoid , named the _tropical bimonoid_.  now fix a semiring / bimonoid and an alphabet . a _ weighted finite automaton _ ( wfa ) over and a quadruple where is a finite set of states , is the starting state , is set of the final states , is the transition weight function and is the weight of entering the automaton . for ,we write .let be the set of complete non - quantitative tests and be the set of complete non - quantitative assignments .let be the set of complete quantitative tests and be the set of complete quantitative assignments .a weighted netkat automata is a finite state weighted automaton over a structure and alphabet .the inputs to the automaton are so called reduced strings introduced in , which belong to the set , i.e. , the strings belonging to are of the form : for some . intuitively , attempts to consume from the front of the input string and move to a new state with a weight and the new state has the residual input string .the following construction shows the equivalence between wnetkat and weighted automata .  * from wfa to wnetkat*  let be a weighted netkat automata over and .an accepting path in  can be write as the following wnetkat expression :   , where + 1 . , and for ; + 2 . for .  * from wnetkat to wfa*  let be a weighted automata expression , then following , we can define a set of reduced strings which are semantically equivalent to .we define a weighted netkat automata over a structure and alphabet , where + and .+ is defined as : iff for short write . + + +   we have the following theorem .\(1 ) for every finite weighted wnetkat automaton , there exists a wnetkat expression such that the set of reduced strings accepted by is the set of reduced strings of .( 2 ) for every wnetkat expression , there is a weighted wnetkat automaton accepting the set of the reduced strings of .let us just give some examples :  1 .for the cost reachability use case , there exists a weighted wnetkat automaton over the tropical semiring that accepts the set of reduced strings of the wnetkat expression in section [ sec : app - cost ] .2 .  for the capacitated reachability : ( i ) there exists a weighted wnetkat automaton over the semiring that accepts the set of the reduced strings of the wnetkat expression for the splitable case in section [ sec : app - cap ] . ( ii )there exists a weighted wnetkat automaton over the tropical bimonoid that accepts the set of the reduced strings of the wnetkat expression for the unsplitable case in section [ sec : app - cap ] .  from this relationship, we have the following theorem about the ( un)decidability of wnetkat expression equivalence .deciding equivalence of two wnetkat expressions is equal to deciding the equivalence of the two corresponding weighted wnetkat automata .for all the semiring and bimonoid we encountered in this paper , the wfa equivalence is undecidable . therefore , the equivalence is also undeciable .this negative result highlights the inherent challenges involved in complex network languages which are powerful enough to deal with weighted aspects .however , we also observe that in many practical scenarios , the above undecidability result is too general and does not apply .for example , most of the use cases presented in in section [ sec : applications ] can actually be reduced to test _ emptiness _ : we often want to test whether a given wnetkat expression equals , i.e. , whether the corresponding weighted netkat automaton is empty .indeed , there seems to exist an intriguing relationship between emptiness and reachability .deciding whether a wnetkat expression is equal to is equal to deciding the emptiness of the corresponding weighted automaton .interestingly , as shown in  , the emptiness problem is decidable for several semirings / bimonoids , e.g. , the tropical semiring and the tropical bimonoid used in this paper .this leads to the decidability of the wnetkat equivalence over these structures .another interesting domain with many decidability results are unambiguous regular grammars and unambiguous finite automata  .accordingly , in our future work , we aim to extend these concepts to the weighted world and explore the unambiguous subsets of wnetkat which might enable decidability for equivalence .we conclude with some remarks on compilation and compatibility to openflow . in general , openflow today does not accommodate _ stateful _ packet operations , and thus , per - connection or per - packet logic require involvement of the controller .moreover , openflow switches do not per se support arithmetic computations , such as addition of packet field values .  however , we currently witness a strong trend toward computationally more advanced and stateful packet - processing functionality . for example , the advent of programming protocol - independent packet processors like p4  , programming platform - independent stateful openflow applications inside the switch like openstate  , but also systems like snap  , pof  , or domino  introduce features which render these platforms potentially interesting compilation targets for . to give another example, open vswitch allows running on - hypervisor `` local controllers '' in addition to a remote , primary controller , to introduce a more stateful packet processing .nevertheless , we observe that several features of _ today s _ openflow versions can be exploited for the compilation of expressions .for example , in order to implement arithmetic operations ( see e.g. , equations ( 3 ) and ( 4 ) ) , we can simply use lookup tables realized as openflow rules , see the technique in  .thus , cost reachability queries can be compiled to flow tables similarly as in netkat .interestingly , however , also a simple form of switch state can readily be implemented in openflow today .indeed , openflow switches provide stateful features such as group tables , packet counters , bandwidth meters , etc .for example , a simple yet inefficient solution to compile switch variables is to use either the meta - rule approach taken by schiff et al . ( introducing additional flow rules ) , or to leverage round robin groups  . finally , we note that while openflow actions can be used to forward packets to specific queues , the scheduling regime for the queues is defined via the management plane  .in our future research , we aim to chart a more comprehensive landscape of the decidability and decision complexity of  . in the longer term, we also aim to extend  to support probabilistic aspects of networking .we would like to thank alexandra silva , nate foster , and dexter kozen for many inputs and discussions on wnetkat .n. foster , r. harrison , m. j. freedman , c. monsanto , j. rexford , a. story , and d. walker .frenetic : a network programming language . in _ proc .16th acm sigplan international conference on functional programming ( icfp ) _ , pages 279291 , 2011 .d. kirsten .the support of a recognizable series over a zero - sum free , commutative semiring is recognizable . in _ developments in language theory , 13th international conference , dlt 2009 , stuttgart , germany , june 30 - july 3 , 2009 .proceedings _ , pages 326333 , 2009 .r. e. stearns and h. b. hunt . on the equivalence and containment problems for unambiguous regular expressions , grammars , and automata . in _ proc .22nd annual symposium on foundations of computer science ( sfcs ) _ , 1981 .

Abstract: programmability and verifiability lie at the heart of the software - defined networking paradigm . while openflow and its match - action concept provide primitive operations to manipulate hardware configurations , over the last years , several more expressive network programming languages have been developed . this paper presents  , the first network programming language accounting for the fact that networks are inherently weighted , and communications subject to capacity constraints ( e.g. , in terms of bandwidth ) and costs ( e.g. , latency or monetary costs ) .  is based on a syntactic and semantic extension of the netkat algebra . we demonstrate several relevant applications for  , including cost- and capacity - aware reachability , as well as quality - of - service and fairness aspects . these applications do not only apply to classic , splittable and unsplittable -flows , but also generalize to more complex network functions and service chains . for example , allows to model flows which need to traverse certain waypoint functions , which may change the traffic rate . this paper also shows the relation between the equivalence problem of wnetkat and the equivalence problem of the weighted finite automata , which implies undecidability of the former . however , this paper also succeeds to prove the decidability of another useful problem , which is sufficient in many practical scnearios : whether an expression equals to 0 . moreover , we initiate the discussion of decidable subsets of the whole language .