More Definitions:Assume n = |V|, e = |E|
The size of the graph is n+e
- An algorithm running in time O(n+e) has just time to inspect each vertex and edge.
A path in G is a sequence (v0,v1,...,vk) of vertices such that (vi, vi+1) in E, for all 0 <= i < k. Its length is k and it is a path from v0 to vk.
A cycle is a path such that v0 = vk.
An undirected graph is connected if and only if there is a path between every pair of vertices.