zion4zion wrote:There can only be one "best" algorithm. And you haven't told what you find a better algorithm: a faster runtime, or an easier to understand algorithm. In the case of an easier to understand algorithm, Bellman-Ford would be a good choice.
i want to find shortest path in a negative weighted graph.
any other best algorithm than Bellman Ford algorithm ?
Also the weight of the edge may change depending upon the traversing...I don't know what you mean by that.
help me in this !!
zion4zion wrote:I don't know about others but I still don't understand this.
that means, for example, if there are 10 similar type of nodes named NAME1 in a network with 50 nodes, and cost of visiting NAME1 will be the number of nodes of NAME! that are not yet traversed.
sabre150 wrote:Same here.
...
I don't know about others but I still don't understand this.
zion4zion wrote:Yes.
can Bellman Ford algorithm can be used for undirected graph?
zion4zion wrote:An undirected graph is just a directed graph with each linked pair of nodes having a directed link in both directions.
can Bellman Ford algorithm can be used for undirected graph?
zion4zion wrote:By ignoring them.
after detecting negative cycles in bellman ford algorithm, how we can eliminate that? plz help me !
zion4zion wrote:No.
my problem is to find shortest path between a source node and a destination node, the cost of the nodes in between may be negative.
And also the cost of the node may vary. for example, if there are 5 blue nodes totally, the cost of blue node that is present first in the shortest path is 5, and the second's is 4 , the thirds is 3.....
you understood ?
prometheuzz wrote:I suspect it is not failing, I suspect it is just not doing what the OP wants. I still don't understand what the OP wants.
But you said you already implemented the algorithm. Why don't you post it and explain in detail when it is failing.