# Representation Of Graphs

**Problem 1**. Use adjacency matrix to represent the graphs shown in Figure below

**Solution**. We order the vertices in Figure (1)(a) as v1, v2, v3 and v4.

Since there are four vertices, the adjacency matrix representing the graph will be a square matrix of order four. The required adjacency matrix A is

We order the vertices in Figure (1)(b) as v1, v2 and v3. The adjacency matrix representing the graph is given by

Taking the order of the vertices in Figure(1)(c) as v1, v2, v3 and v4. The adjacency matrix representing the graph is given by

**Problem 2**. Draw the undirected graph represented by adjacency matrix A given by

Solution. Since the given matrix is a square of order 5, the graph G has five vertices v1, v2, v3, v4

Draw an edge from vi to vj where aij = 1. The required graph is drawn in Figure below.and v5.