Trees and Networks - Key Properties
Trees possess unique structural properties that distinguish them from general graphs and enable efficient algorithms. Understanding these characterizations provides powerful tools for proving properties and designing algorithms.
For a graph with vertices, the following are equivalent:
- is a tree (connected and acyclic)
- is connected and has edges
- is acyclic and has edges
- is connected and removing any edge disconnects it
- is acyclic and adding any edge creates exactly one cycle
- There is exactly one path between any two vertices
Proof sketch: We prove .
: Induction on . Base: has 0 edges. Inductive step: Remove a leaf (exists since acyclic and connected), apply induction to smaller tree.
: If had a cycle, removing one edge would keep it connected, contradicting minimality of edge count for connectivity.
: is acyclic. If disconnected with components, each component is acyclic with vertices and edges. Total edges: , contradiction.
The center of a tree is the set of vertices minimizing the maximum distance to other vertices (eccentricity). Every tree has either one center vertex (forming a central tree) or two adjacent center vertices (forming a bicentral tree).
The center can be found by repeatedly removing leaves until one or two vertices remain.
Depth-First Search (DFS): Explore as deeply as possible before backtracking. Orders:
- Preorder: Process root, then left subtree, then right subtree
- Inorder: Process left subtree, then root, then right subtree
- Postorder: Process left subtree, then right subtree, then root
Breadth-First Search (BFS): Process vertices level by level from the root.
DFS and BFS both run in time on trees with vertices.
A full binary tree has every vertex with 0 or 2 children. A complete binary tree has all levels filled except possibly the last, which is filled left-to-right.
For a binary tree with vertices, internal vertices, and leaves:
- In a full binary tree: (one more leaf than internal vertex)
- Maximum height: (degenerate to path)
- Minimum height: (complete tree)
The number of full binary trees with internal vertices equals the Catalan number .
These also count:
- Ways to parenthesize factors
- Binary trees with leaves
- Dyck paths of length
Tree decompositions extend tree properties to general graphs. Treewidth measures how "tree-like" a graph is: graphs with small treewidth admit efficient dynamic programming algorithms. Many NP-hard problems become tractable on graphs of bounded treewidth, including vertex cover, independent set, and graph coloring. This connection between tree structure and computational complexity is fundamental in parameterized complexity theory and has applications in database query optimization and computational biology.
These properties make trees one of the most well-understood and algorithmically tractable graph classes.