Why are two vertices considered connected in an undirected graph even if there is no direct edge between them?
Connectivity in an undirected graph only requires the existence of a path between two vertices, not a direct edge. Vertices can be connected consecutively through a sequence of intermediate edges.
Conditions
- Applies to undirected graphs.
- Connectivity is judged by the existence of a path, not direct adjacency.
Reasoning, step by step
- Identify the two vertices in question.
- Search for a sequence of edges that forms a path from the first vertex to the second.
- If such a path exists, conclude that the vertices are connected, regardless of whether a direct edge is present.
Example
In the video's example, vertices A and D have no direct edge, but one can travel from A to C, then from C to D. Because the path A -> C -> D exists, A and D are considered connected.
Common misconceptions
- Misinterpreting "connected" as requiring a direct edge between two vertices.
- Assuming that if two vertices are not adjacent, they cannot be part of the same connected component.
Watch the explanation
0:35 – 1:03Watch this moment ↗
Explore next
Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.