Representing mathematical equations

varun7rs at gmail.com varun7rs at gmail.com
Mon Oct 6 09:07:11 EDT 2014


On Monday, 6 October 2014 15:03:44 UTC+2, varu... at gmail.com  wrote:
> On Monday, 6 October 2014 13:14:04 UTC+2, varu... at gmail.com  wrote:
> 
> > Hello,
> 
> > 
> 
> > 
> 
> > 
> 
> > I am working on a mathematical equation which I'm finding really hard to express in python. Could any of you spare some time to help me out?
> 
> > 
> 
> > 
> 
> > 
> 
> > The equation looks like this
> 
> > 
> 
> > 
> 
> > 
> 
> > b(i,x) = [Σ(l∈L) [bd(l) * dist(l) * hc(l)]]  / Σ(l∈L) l
> 
> > 
> 
> > 
> 
> > 
> 
> > I have a problem in representing the above equation. I don't know how to use teh loops over here to express b(i,x)
> 
> > 
> 
> > 
> 
> > 
> 
> > i,x,l are sets with different numbers
> 
> > 
> 
> > 
> 
> > 
> 
> > Thank You
> 
> > 
> 
> > I'm sorry if the equation is not expressed in a standard form. I don't have LateX
> 
> 
> 
> Okay, I forgot to explain them. L is a set of links, dist is a number (distance), bd is the bandwidth and hc is a number as well (hopcount)...different bandwidths, hopcounts and distances for different links...
> 
> b(i,x) is what i intend to calculate out of these details...here 'i' could be the head or tail of the link l and x is a node that hosts i
> 
> 
> 
> Thank You

Unbelievable. I again forgot to express them

L  = [(1,3), (5,7), .....]
bd = [23, 34,43.44.....]
dist = [3,7,5,7, ....]
hc = [2,3,4,1,2,2,...]
for every l belonging to L, i could be either 1 or 3 for L[0], similarly for L[1] it could be 5 or 7



More information about the Python-list mailing list