An undirected graph is called a connected graph when any pair of vertices can be connected by a path. Otherwise, it’s a disconnected path. For directed graphs, there are no simple explanations. Use the definition below.
Connected Graphs
A graph is connected iff every pair of vertices has a path between them. Otherwise the graph is disconnected.
Condition 1
A graph is disconnected iff its vertex set can be split into 2 disjoint non-empty sets with no edges between them.
Condition 2
A graph is connected iff every entry of is non-zero.
Connected Components
A maximal connected subgraph. Every pair of vertices inside are connected. No connection to outside vertices. Each component is an isolated piece of a graph.
A connected graph has exactly 1 connected component which is itself. A disconnected graph has more than 2 components.
Distance
Length of the shortest path between two vertices. Denoted as . if no path exists,
Properties:
- Non-negativity:
- Identity:
- Symmetry:
- Triangle inequality:
Diameter
Maximum distance between any two vertices. Denoted as .
Measures the largest shortest path in the graph.