Graphs

The in-degree of a vertex v in G=(V,E) is the number of incoming edges $$|{ w \in V : (w, v) \in E}|$$ similarly with out-degree.


Theorem: If G is a simple graph with m edges, then $$\sum_{v \in G} \text{deg}(v) = 2m$$
Proof: An edge (u,v) is counted twice. Thus, the total contribution of the edges to the degree of the vertices is twice the number of edges.


Theorem: If G is a directed graph with m edges, then $$\sum_{v \in G} \text{indeg} (v) = \sum_{v \in G} \text{outdeg} (v) = m$$
Proof: In a directed graph an edge (u,v) contributes one unit to the in-degree and one unit to the out-degree.


Theorem: Let G be a simple graph with n vertices and m edges. If G is undirected then mn(n1)/2 and if G is directed then mn(n1)

Proof:




Theorem: Let G be an undirected graph with n vertices and m edges. Then if G is connected mn1

Proof: If G is connected then there exists a path between all pairs of vertices. The simplest case for this if all vertices are in a straight line connected with each other (spanning tree). This will contain n1 edges (one between each pair of vertex). Thus mn1


Theorem: Let G be an undirected graph with n vertices and m edges. Then if G is a tree m=n1

Proof: A tree is a connected graph without cycles. This will the simplest case wherein the n vertices are connected with each other in a straight line only to one other vertex. If they were to be connected with any other vertex this would create a cycle. Therefore, if G is a tree then m=n1 (one edge between each pair of vertex)


Theorem: Let G be an undirected graph with n vertices and m edges. Then if G is a forest mn1

Proof: A forest is a graph without cycles. Since there is no restriction on the graph to be connected (but it can be). The number of edges mn1.