

Borchert)ĭuring an interview in 2001, Dr. Edsger Dijkstra at ETH Zurich in 1994 (image by Andreas F. In 1959, he published a 3-page article titled "A note on two problems in connexion with graphs" where he explained his new algorithm. Dijkstra, a brilliant Dutch computer scientist and software engineer. This algorithm was created and published by Dr. It has broad applications in industry, specially in domains that require modeling networks. This algorithm is used in GPS devices to find the shortest path between the current location and the destination.

Particularly, you can find the shortest path from a node (called the "source node") to all other nodes in the graph, producing a shortest-path tree. With Dijkstra's Algorithm, you can find the shortest path between nodes in a graph. Now that you know the basic concepts of graphs, let's start diving into this amazing algorithm. 💡 Tip: These weights are essential for Dijkstra's Algorithm. This number is used to represent the weight of the corresponding edge. The weight of an edge can represent distance, time, or anything that models the "connection" between the pair of nodes it connects.įor example, in the weighted graph below you can see a blue number next to each edge. Weighted GraphsĪ weight graph is a graph whose edges have a "weight" or "cost". 💡 Tip: in this article, we will work with undirected graphs. We use arrows instead of simple lines to represent directed edges. Directed: if for every pair of connected nodes, you can only go from one node to another in a specific direction.Undirected: if for every pair of connected nodes, you can go from one node to the other in both directions.Network represented with a graph Types of Graphs For example, we could use graphs to model a transportation network where nodes would represent facilities that send or receive products and edges would represent roads or paths that connect them (see below). Graphs are directly applicable to real-world scenarios. 💡 Tip: Two nodes are connected if there is an edge between them. Nodes are represented with colored circles and edges are represented with lines that connect these circles. This is a graphical representation of a graph: The connections between nodes are called edges.They represent real-life objects, persons, or entities. Graphs are data structures used to represent "connections" between pairs of elements. Let's start with a brief introduction to graphs. How it works behind the scenes with a step-by-step example.You will see how it works behind the scenes with a step-by-step graphical explanation. Welcome! If you've always wanted to learn and understand Dijkstra's algorithm, then this article is for you.
