Weighted Graphs
Explore the concept of weighted graphs where each edge has an assigned weight representing values like distance. Understand how these weights influence path lengths, differentiating weighted graphs from unweighted ones, and how this model applies to problems in graph theory and algorithms.
We'll cover the following...
Introducing weighted graphs
Weighted graphs are a slight generalization of graphs that are useful for modeling more complex problems using graph theory. In an (edge)-weighted graph, each edge is assigned a weight, which is usually a number that represents a property of the edge.
For example, consider this undirected graph of subway stations, where each edge represents a train connection. The weight of an edge is a real number representing the distance between the two nodes it connects.
Formally, a weighted graph is a graph with nodes , edges and an additional edge weight function ...