Weighted Graph
A weighted graph is a type of graph in which each edge has a numerical value, known as a weight. These weights can represent various metrics, such as distance, cost, or time, depending on the context. In a weighted graph, the weight of an edge helps determine the shortest path or the least expensive route between nodes, making it useful in applications like navigation and network design.
In a weighted graph, the nodes are often referred to as vertices, while the connections between them are called edges. Algorithms like Dijkstra's algorithm and Bellman-Ford algorithm are commonly used to find the shortest paths in weighted graphs. This structure is essential in fields such as computer science, transportation, and logistics.