Respuesta :

Two vertices in a graph are adjacent if there exists an edge between them. The entry in row i and column j of the adjacency matrix for a graph is the number of one-edge paths that take you from vertex i to vertex j.

(a)

• None of the vertices have edges that connect them to themselves

v₁ shares 2 edges with v₂ and 1 edge with v

• v₂ shares 2 edges with v₁ and no edges with v

• v₃ shares 1 edge with v₁ and none with v

So, the adjacency matrix is

[tex]\begin{bmatrix}0&2&1\\2&0&0\\1&0&0\end{bmatrix}[/tex]

(b)

• Only v₁ has a loop that connects it to itself

v₁ shares 2 edges with v₃ and none with either of v₂ or v

v₂ shares 1 edge with v₃ and none with either v₁ or v

v₃ shares 2 edges with v₁, 1 with v₂, and 2 with v

v₄ shares 2 edges with v₃ and none with either v₁ or v

The adjacency matrix is then

[tex]\begin{bmatrix}1&0&2&0\\0&0&1&0\\2&1&0&2\\0&0&2&0\end{bmatrix}[/tex]