Graph vocabulary
Vertex, edge, degree, simple, connected, tree, cycle, planar.
Graph : a set of vertices (nodes) and a set of edges (arcs) that join pairs of vertices.
Degree of vertex = number of edges incident with . A loop (edge from to itself) contributes to .
Handshaking lemma. The sum of all degrees equals twice the number of edges: Consequence: the number of odd-degree vertices is always EVEN.
Simple graph. No loops; at most one edge between each pair of vertices.
Multigraph. Multiple edges between the same pair are allowed.
Weighted graph. Each edge has a numerical weight (distance, cost, time).
Directed graph (digraph). Each edge has a direction (arrow). = out-degree; = in-degree.
Walk. A sequence of edges where each edge starts at the vertex the previous one ended.
Path. A walk with no repeated vertices (and so no repeated edges).
Cycle. A walk that returns to its starting vertex with no other repeats.
Connected graph. There is a path between every pair of vertices.
Tree. A connected graph with no cycles. Equivalently: a connected graph with exactly edges on vertices.
Spanning tree. A tree that includes every vertex of .
Planar graph. A graph that can be drawn in the plane without edge crossings. For a CONNECTED planar graph, where is the number of faces, including the outer unbounded face.
Bipartite graph. Vertices split into two sets with edges only between and . (Less central in D1 but defined in the spec.)
- (handshaking).
- Loop contributes to degree.
- Tree: connected, edges, no cycles.
- Planar: .