What does a cycle in a graph mean?
2024
What does a cycle in a graph mean?
Answer: B. A path where the first node is the same as the last node — A cycle in a graph is a path where the first node is the same as the last node, and the path contains at least one edge. This means the path starts and ends…
- A.
A path where the first node is not the same as the last node
- B.
A path where the first node is the same as the last node
- C.
A path where all nodes are visited exactly once
- D.
None of the above
Attempted by 189 students.
Show answer & explanation
Correct answer: B
A cycle in a graph is a path where the first node is the same as the last node, and the path contains at least one edge. This means the path starts and ends at the same node, forming a closed loop.
Note: A cycle must have at least one edge and cannot be a single node unless explicitly defined as a trivial cycle. The path may revisit nodes, but the key is that the start and end are the same.