2081 8

Discrete Structure20815 marksGraph representation using adjacency matrix

Explain any two ways of representing the graph.

Explain any two ways of representing the graph. [5]

An adjacency matrix is a 2D array (matrix) of size V x V, where V is the number of vertices in the graph. Definition: For a graph G = (V, E), the adjacency matrix A is defined as: Example: Consider a graph with 4 vertices (1, 2, 3, 4) and edges: (1,2), (1,3), (2,4), (3,4) Advantages: - Simple to ...

Up nextCompute the value of 8 text MOD 8, -9 text MOD 4, 7 text MOD 17, 6 text MOD 7 and -8 text