V is a set of vertices.
E is a set of edges (lines joining the vertices)
(a)
Two distinct vertices are adjacent when there is an edge joining the two.
So to list vertices adjacent to Y , we need to go through all the edges and select those that include Y as a vertex. The other vertex associated with the same edge is therefore adjacent to Y.
There should be two.
(b) Similarly, edges adjacent to AY are those that include either A or Y in the adjacency list (set E).
(c) degree of a vertex is the number of edges that are incident to it.
(d) add the degrees of all the vertices.
Consider the graph with V = [A, B, C, X, Y, Z] and E = [AX, AY, AZ, BB, CX, CY, CZ, YY]. Without drawing a picture of the graph:
a. List all the vertices adjacent to Y.
b. List all the edges adjacent to AY.
c. Find the degree of Y.
d. Find the sum of the degrees of the vertices.
1 answer