Shortest path (Dijkstra's) algorithm

Dijkstra's algorithm (डीजक्स्त्रा अल्गोरिथम):-

Edsger W. Dijkstra's Algorithm published in 1959 to find the shortest path from one node to every other node within the same weighted graph data structure is called shortest path algorithm.

सन 1959 में, एड्सगेर डब्लू. डीजक्स्त्रा ने एक अल्गोरिथम प्रकाशित किया "जो वेटेड ग्राफ में किसी नोड से अन्य नोड्स के मध्य सबसे छोटे पाथ को खोजने का कार्य करटी है" इसे ही शोर्टेस्ट पाथ अल्गोरिथम कहा जाता है।    

Steps of Dijkstra's algorithm (डीजक्स्त्रा अल्गोरिथम के चरण):-

1.) Initialize distances according to the algorithm(first assume infinity)

2.) Now select starting node and calculate distances to adjacent nodes. After that

3.) Select next node with minimal distance and repeat calculation of its adjacent nodes.

4.) Continue this process for every node within the graph and you get resultant shortest-path tree.

Example(उदाहरण):-

Shortest Path Dijakstra's algorithm

No comments:

Post a Comment

Stack Data Structure, Push, Pop and Peek Operations , Applications of Stack

Stack is a linear data structure. It is collection of ordered data elements. It is also known as LIFO system (last in first out). It means i...