dijkstra

Dijkstra recurisve

Hi i'm having trouble doing an homework , i've to make recursive version of Dijkstra Algorithm , can somebody help me? ...

Proving that the distance values extracted in Dijkstra's algorithm is non-decreasing?

I'm reviewing my old algorithms notes and have come across this proof. It was from an assignment I had and I got it correct, but I feel that the proof certainly lacks. The question is to prove that the distance values taken from the priority queue in Dijkstra's algorithm is a non-decreasing sequence. My proof goes as follows: Pr...

Suggestions of the easiest algorithms for some Graph operations

Hi, The deadline for this project is closing in very quickly and I don't have much time to deal with what it's left. So, instead of looking for the best (and probably more complicated/time consuming) algorithms, I'm looking for the easiest algorithms to implement a few operations on a Graph structure. The operations I'll need to do is ...

How to optimize Dijkstra algorithm for a single shortest path between 2 nodes?

Hi, I was trying to understand this implementation in C of the Dijkstra algorithm and at the same time modify it so that only the shortest path between 2 specific nodes (source and destination) is found. However, I don't know exactly what do to. The way I see it, there's nothing much to do, I can't seem to change d[] or prev[] cause th...

Big problem with Dijkstra algorithm in a linked list graph implementation

Hi, I have my graph implemented with linked lists, for both vertices and edges and that is becoming an issue for the Dijkstra algorithm. As I said on a previous question, I'm converting this code that uses an adjacency matrix to work with my graph implementation. The problem is that when I find the minimum value I get an array index. T...

Dijkstra's Algorithm explanation java

Hi, I have found an implementation for dijkstras algorithm on the internet and was wondering if someone could help me understand how the code works. Many thanks private int nr_points=0; private int[][]Cost; private int []mask; private void dijkstraTSP() { if(nr_points==0)return; //algorithm=new String("Dijkstra"); ...

Dijkstra shortest path algorithm with edge cost.

Hello, I have a directed, positive weighted graph. Each edge have a cost of use. I have only A money, i want to calculate shortest paths with dijkstra algorithm, but sum of edges costs on route must be less or equal to A. I want to do this with most smallest Dijstra modification (if I can do it with small modification of Dijkstra). I ...

dijkstra/prim's algorithm...a little help?

I was wondering for dijkstra's and prim's algorithm, what happens when they are choosing between more than one vertex to go to ,and there are more than one vertex with the same weight. For example ...

bellman forge, dijkstra's, prim's algorithm, kruskals, directed acrylic graph

What are some real life examples where each one of these are used? ...

Dijkstra's algorithm to find all the shortest paths possible

Hello, I'm working on Dijkstra's algorithm,and i really need to find all the possible shortest paths,not just one.I'm using an adjacency matrix and i applied Dijkstra's algorithm,and i can find the shortest path.But i need to find all the paths with that minimum cost,i mean all the possible solutions,if they exist.If anyone have an ideea...

Best Dijkstra papers to explain this quote?

I was enjoying "The Humble Programmer" earlier today and ran across this choice quote: Therefore, for the time being and perhaps forever, the rules of the second kind present themselves as elements of discipline required from the programmer. Some of the rules I have in mind are so clear that they can be taught and that there never ne...

Implementing Dijkstra's Algorithm

I've been tasked (coursework @ university) to implement a form of path-finding. Now, in-spec, I could just implement a brute force, since there's a limit on the number of nodes to search (begin, two in the middle, end), but I want to re-use this code and came to implement Dijkstra's algorithm. I've seen the pseudo on Wikipedia and a fri...

Neo4j Performing shortest path calculations on stored data

I would like to store the following graph data in the database, graph.makeEdge( "s", "c", "cost", (double) 7 ); graph.makeEdge( "c", "e", "cost", (double) 7 ); graph.makeEdge( "s", "a", "cost", (double) 2 ); graph.makeEdge( "a", "b", "cost", (double) 7 ); graph.makeEdge( "b", "e", "cost", (double) 2 ); Then run the Dijskra algorighm...

Dijkstra’s algorithm and functions

Hi guys, the question is: suppose I have an input function like sin(2-cos(3*A/B)^2.5)+0.756*(C*D+3-B) specified with a BNF, I will parse input using recursive descent algorithm, and then how can I use or change Dijkstra’s algorithm to handle this given function? I need to execute it with sin | cos | sqrt | ln, where Dijkstra’s algorithm ...

What algorithms did Dijkstra develop?

I recently asked a question about one of the Dijkstra’s algorithms (shunting-yard). But almost everyone thought "Dijkstra's algorithm" meant his shortest path algorithm. What other algorithms has Dijkstra developed? ...

Efficiently finding the shortest path in large graphs

I'm looking to find a way to in real-time find the shortest path between nodes in a huge graph. It has hundreds of thousands of vertices and millions of edges. I know this question has been asked before and I guess the answer is to use a breadth-first search, but I'm more interested in to know what software you can use to implement it. F...

Dijkstra's algorithm

Why can't we apply Dijkstra's algorithm for a graph with negative weights? ...

Incorrect results for average distance using Dijkstra (java)

The graph is unweighed, an element of the array of HashSets neighbours[] is a node neighbours[1] is node 1 (they start from 0 mind you) with its unique neighbouring nodes say 2 3 4 5. (so neighbours[5] will contain 1). And I have the following method I did with great deal of help as I dont get the algo much beyond theory. The number it ...

How would increasing the edge weight on a graph affect the Dijkstra's algorithm?

The question is: Consider the directed graph with 5 vertices. Let the Dijkstra’s algorithm yield shortest paths from node s to all the other nodes, as shown in Fig. 1. Let the weight of the edge (x, t), increase and assume all nodes somehow obtain this information. How does node s modify Dijkstra’s algorithm to make minimum recomputation...

A* implemented in C

Where can I find an A* implementation in C? I was looking around but it seems my google-fu is not strong enough. I've started writing my own implementation, but then I remembered Stack Overflow and I thought I should ask here first. It seems a bit complicated to write a real A* implementation - I was tempted to just write an implementat...