Review the key concepts, formulae, and examples before starting your quiz.
๐Concepts
A weighted network is a graph where each edge is assigned a numerical value called a weight. These weights can represent distances, costs, time, or capacities.
A path in a weighted network is a sequence of edges connecting two vertices. The weight of the path is the sum of the weights of the edges in that path: .
An adjacency matrix for a weighted network uses the weights of the edges as entries. If no edge exists between two vertices and , the entry is typically represented as or depending on the context (e.g., for flow, for distance).
The Shortest Path Problem involves finding a path between two vertices such that the sum of the weights of its constituent edges is minimized.
A Minimum Spanning Tree (MST) is a subgraph that connects all vertices together, without any cycles, and with the minimum possible total edge weight. Common algorithms to find this include Kruskal's and Prim's algorithms.
The degree of a vertex in a weighted graph is still the number of edges incident to it, but the strength of a vertex is the sum of the weights of all edges connected to it: .
๐Formulae
tokens of a path
๐กExamples
Problem 1:
Given a network with vertices and . The weights are: , , and . Find the shortest path from to and calculate its total weight.
Solution:
There are two possible paths from to :
- Direct path: with weight .
- Indirect path: with weight .
Since , the shortest path is the direct edge with a total weight of .
Explanation:
To find the shortest path, we compare the sum of weights of all possible routes between the starting and ending vertices.
Problem 2:
Construct the adjacency matrix for a weighted graph with 3 vertices () where the weights are: , , and . Assume the graph is undirected and no self-loops exist.
Solution:
Explanation:
In an undirected weighted adjacency matrix, the entry in row and column is the weight of the edge between and . Since there are no self-loops, the diagonal elements are .
Problem 3:
Calculate the total weight of a cycle in a network where the edges are , , and .
Solution:
Explanation:
The total weight of a cycle is the sum of the weights of all edges forming the closed loop.