Recall & Review
beginner
What is a weighted graph?
A weighted graph is a type of graph where each edge has a number called a weight. This weight often represents cost, distance, or time between two points.
Click to reveal answer
beginner
How do weights in a graph help in real life?
Weights help show how much it costs or how far it is to move from one point to another, like distances on a map or prices in a network.
Click to reveal answer
beginner
What is the difference between a weighted graph and an unweighted graph?
A weighted graph has numbers (weights) on edges, while an unweighted graph treats all edges as equal with no weights.
Click to reveal answer
intermediate
What is a common use of weighted graphs in computer science?
Weighted graphs are used to find the shortest path between points, like GPS navigation or network routing.
Click to reveal answer
advanced
Can weights in a weighted graph be negative? What does it mean?
Yes, weights can be negative in some cases. Negative weights might represent things like profit or gain, but they can make finding paths more complex.
Click to reveal answer
What does the weight on an edge in a weighted graph usually represent?
✗ Incorrect
Weights typically show cost, distance, or time between connected points.
Which of these is NOT true about weighted graphs?
✗ Incorrect
In weighted graphs, edges are not all equal because they have weights.
What is a common algorithm used with weighted graphs to find the shortest path?
✗ Incorrect
Dijkstra's algorithm is widely used to find shortest paths in weighted graphs.
Can weights in a weighted graph be negative?
✗ Incorrect
Weights can be negative in some graphs, but this requires special handling.
In a weighted graph, what does a higher weight on an edge usually mean?
✗ Incorrect
Higher weights usually mean higher cost or longer distance.
Explain what a weighted graph is and give a real-life example.
Think about how roads between cities have distances.
You got /3 concepts.
Describe why weights are important in graphs and how they affect finding paths.
Consider how GPS finds the fastest route.
You got /3 concepts.