where:
Graphical representation:
There are no duplicate elements in a set
There can be duplicate elements in a list
(Each edge represents a way to travel between 2 locations)
(An edge represents an equivalence relationship between 2 structures; some structures are "self-equivalent" while others and not)
Example:
The degree of each node = 2
Walk = (A,B), (B,C), (C,D)
I.e.: trail = use an edge at most once
I.e.: path = visit a vertex at most once
(I put "path" in quotes because the starting vertex is repeated)
∑ deg(v) = 2m v ∈ G
Each edge contributes 2 to the total sum
Therefore: The total sum = 2 × m
There are 5 edges
And: deg(A) + deg(B) + deg(C) + deg(D) = 3 + 2 + 3 + 2 = 10
∑ indeg(v) = ∑ outdeg(v) = m v ∈ G v ∈ G
directed edge:
Each edge contributes 1 to each of the total sum
Therefore:
And: indeg(A) + indeg(B) + indeg(C) + indeg(D) = 1 + 1 + 2 + 1 = 5 outdeg(A) + outdeg(B) + outdeg(C) + outdeg(D) = 2 + 1 + 1 + 1 = 5
Then:
n(n-1) m ≤ ------- 2
Proof:
n! Choose(n, 2) = ----------- (n-2)! 2! n (n-1) (n-2) (n-3).... 1 = --------------------------- [(n-2) (n-3) ... 1] [2] n(n-1) = -------- 2
Since this number is the maximum, it follows that:
m = a possible number of edges in a graph ≤ maximum number of edges in a graph n (n-1) ≤ --------- 2
Kn has (n×(n−1))/2 edges
m = n -1
m ≤ n -1
m ≥ n -1