Exam-style question
Try this first
Explain the terms vertex or node, edge or arc, undirected graph, and directed graph. Include one example of a situation where a graph could be used.
Model answer
What a good answer should say
- A vertex, also called a node, is an item or point in a graph.
- An edge, also called an arc, is a connection between vertices.
- In an undirected graph, an edge has no direction, so the connection works in both directions.
- In a directed graph, an edge has a specified direction from one vertex to another.
Explanation
Why this works
The answer identifies the main parts of a graph and distinguishes connections with and without direction. The example shows how a graph can represent a relationship between items.
Common mistake
No common mistake is linked to this question yet.
