Weighted Directed Acyclic Graphs: algorithm to find edge weights such that they define a distance function? -


i have technical problem can formuated directed acyclic graph (dag). nodes represent events (with unknown timing), directed edges encoding relation ship: "i'm younger you/i happened before you".

i need estimate edge weights (i.e. "dynamic weights") such weighted dag (wdag) implies distance function on dag. in other words sum of weights paths between nodes , b should equal paths.

this undetermined problem, if weights integers (same underlying reason topological sorting not unique, suppose). in generality, edge weights, represent timeintervals between nodes/events, real numbers. therefore i'm introducing preset objective function c=j(wdag) on weighted dag, here unspecified.

my question is: there algorithm distributes positive definite weights on wdag, subject constraint 1) weights form distance function of dag , 2) minimizing objective function cost c.

this seems unrelated shortest-path or minimum-spanning-tree problems classically associated wdag's. ideas formal or heuristic solution above problem?

regards,

stephane

i think need topological sorting.

  1. sort nodes according topological sort.
  2. distribute them in [0,1] interval in order got.
  3. now distance of node-pairs on [0,1] line give weight of edge connecting them.

this 1 possible solution. if have more constraints on weights describe in question, problem might more difficult.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -