Recall & Review
beginner
What is the main structural difference between a graph and a tree?
A tree is a special type of graph that is connected and has no cycles, while a graph can have cycles and may not be connected.
Click to reveal answer
beginner
Can a tree have cycles? Why or why not?
No, a tree cannot have cycles because it must be acyclic to maintain a hierarchical structure with a single path between any two nodes.
Click to reveal answer
beginner
Is it possible for a graph to be disconnected? Explain.
Yes, a graph can be disconnected, meaning it can have multiple separate parts with no paths between some nodes.
Click to reveal answer
beginner
What does it mean for a tree to be connected?
A tree is connected if there is exactly one path between any two nodes, meaning all nodes are reachable from the root.
Click to reveal answer
intermediate
How does the number of edges in a tree compare to the number of nodes?
A tree with n nodes always has exactly n-1 edges, ensuring no cycles and full connectivity.
Click to reveal answer
Which of the following is true about trees?
✗ Incorrect
Trees are connected and have no cycles, which means they are acyclic.
Can a graph have multiple paths between two nodes?
✗ Incorrect
Graphs can have cycles and multiple paths between nodes.
How many edges does a tree with 7 nodes have?
✗ Incorrect
A tree with n nodes has n-1 edges, so 7 nodes means 6 edges.
Which statement is false about graphs?
✗ Incorrect
Only trees have exactly n-1 edges; graphs can have any number of edges.
What is a key property of a tree that distinguishes it from a general graph?
✗ Incorrect
Trees have exactly one path between any two nodes, ensuring no cycles.
Explain the key structural differences between a graph and a tree.
Think about connectivity and cycles.
You got /5 concepts.
Describe why a tree cannot have cycles and how this affects its structure.
Consider what cycles would do to paths between nodes.
You got /4 concepts.