T. Britz/D. Chan/D. Trenerry
§5 Graph Theory
Loosely speaking, a graph is a set of dots and dot-connecting lines. The dots are called vertices and the lines are called edges. Formally, a (finite) graph G consists of A finite set V whose elements are called the vertices of G; A finite set E whose elements are called the edges of G; A function that assigns to each edge e ∈ E an unordered pair of vertices called the endpoints of e. This function is called the edge-endpoint function. Note that these graphs are not related to graphs of functions. Graphs can be used as mathematical models for networks such roads, airline routes, electrical systems, social networks, biological systems and so on. Graph theory is the study of graphs as mathematical objects.
1
Exercise. Consider the following graph G with vertices and edges V = {v1 , v2 , v3 , v4 , v5 } and E = {e1 , e2 , e3 , e4 , e5 , e6 , e7 } :
v3 e2 e5 v1 e 1 v2 e3 v4 e 6 v5 e7 e4
Edge e1 e2 e3 e4 e5 e6 e7
Endpoints {v1 , v2 } {v2 , v3 } {v2 , v4 } {v3 , v4 } {v3 , v4 } {v4 , v5 } {v5 }
2
Example. Below are 3 different pictorial representations of the same graph. e1 v1 e2 v2 e1 e3 v3 e4 v1 e4 e2 e3 v3 v2 e4 v1 e1 e3 v3 e2 v2
The edge-endpoint function of this graph is as follows: Edge e1 e2 e3 e4 Endpoints {v1 , v2 } {v1 , v2 } {v2 , v3 } {v3 }
3
If the edge e ∈ E has endpoints v, w ∈ V , then we say that the edge e connects the vertices v and w; the edge e is incident with the vertices v and w; the vertices v and w are the endpoints of the edge e; the vertices v and w are adjacent; the vertices v and w are neighbours. Two edges with the same endpoints are multiple or parallel . A loop is an edge that connects a vertex to the same vertex. The degree of a vertex v, denoted by deg(v), is the number of edges incident with v, counting any loops twice. An isolated vertex is one with degree 0, and a pendant vertex is one with degree 1.
4
Exercise. v3 e2 e5