2081 8

BIT152 ยท 2081 ยท 5 marks

Explain any two ways of representing the graph.

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

Discrete StructureChapter 8: Graph Theory FundamentalsGraph representation using adjacency matrix

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 ...