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.
- sort nodes according topological sort.
- distribute them in [0,1] interval in order got.
- 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
Post a Comment