


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























V= {a,b,c,d,e}
E= {(a,b),(a,c),(a,d), (b,e),(c,d),(c,e), (d,e)}
the in-degree of a vertex v is the number of edges that have v as the head the out-degree of a vertex v is the number of edges that have v as the tail if di is the degree of a vertex i in a graph G with n vertices and e edges, the number of edges is
n
−
0
1
Why? Since adjacent vertices each count the adjoining edge, it will be counted twice
7
3
(^3 )
3
2
a (^) b
c
d e
a (^) b
c
d e a b e d c b e d c
a (^) b
c
d e
b e c
a c d a
a (^) b
c
d e
(i) (ii) (iii) (^) 3 (iv) (a) Some of the subgraph of G (^1)
0 0
(i) (ii) (iii) (iv) (b) Some of the subgraph of G (^3)
tree
forest
tree
tree
tree
If m < n - 1, G is not connected
objects: a nonempty set of vertices and a set of undirected edges, where each edge is a pair of vertices functions: for all graph ∈ Graph , v , v 1 and v 2 ∈ Vertices Graph Create()::=return an empty graph Graph InsertVertex( graph , v )::= return a graph with v inserted. v has no incident edge. Graph InsertEdge( graph , v 1 , v 2 )::= return a graph with new edge between v 1 and v 2 Graph DeleteVertex( graph , v )::= return a graph in which v and all edges incident to it are removed Graph DeleteEdge( graph , v 1 , v 2 )::=return a graph in which the edge ( v 1 , v 2 ) is removed Boolean IsEmpty( graph )::= if ( graph == empty graph ) return TRUE else return FALSE List Adjacent( graph , v )::= return a list of all vertices that are adjacent to v
0 1 1 1
1 0 1 1
1 1 0 1
1 1 1 0
0 1 0
1 0 0
0 1 0
0 1 1 0 0 0 0 0
1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0
symmetric
undirected: n 2 / directed: n 2 Docsity.com
j
n
=
−
0
1
ind vi A j i j
n ( ) = [ , ] =
− ∑ 0
1 outd vi A i j j
n ( ) = [ , ] =
− ∑ 0
1