Graph: vertices and edges
Defines vertices and edges in a graph, along with incidence and adjacency.
Graph: vertices and edges
A (simple, undirected) graph is an ordered pair where:
- is a set of vertices (or nodes).
- is a set of edges, where each edge is a 2-element subset .
If , then:
- and are the endpoints of the edge,
- and are adjacent (neighbors), and
- the edge is incident to each of its endpoints.
Common notation. In a simple undirected graph, the edge is often written as .
Degree. The degree of a vertex is
Variants. Depending on context, one may also allow:
- Directed edges (a directed graph),
- loops , and/or
- multiple edges between the same pair of vertices (a multigraph).
Unless stated otherwise, “graph” typically means simple, undirected.
A graph is called finite-graph if it has finitely many vertices (and hence finitely many edges in the simple case).