Westonci.ca offers quick and accurate answers to your questions. Join our community and get the insights you need today. Experience the ease of finding accurate answers to your questions from a knowledgeable community of professionals. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

Find the number of paths of length 4 between two different vertices in K5​

Find The Number Of Paths Of Length 4 Between Two Different Vertices In K5 class=

Sagot :

K₅ is the 5-complete graph, with adjacency matrix

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

The (i, j)-th entry of the matrix A⁴ gives the number of length-4 paths from vertex i to vertex j. Computing A⁴ isn't so bad:

[tex]A^2 =  \begin{bmatrix} 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 1 \\ 1 & 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 0 \end{bmatrix}  \begin{bmatrix} 0 & 1 & 1 & 1 & 1 \\ 1 & 0 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 1 \\ 1 & 1 & 1 & 0 & 1 \\ 1 & 1 & 1 & 1 & 0 \end{bmatrix} =  \begin{bmatrix} 4 & 3 & 3 & 3 & 3 \\ 3 & 4 & 3 & 3 & 3 \\ 3 & 3 & 4 & 3 & 3 \\ 3 & 3 & 3 & 4 & 3 \\ 3 & 3 & 3 & 3 & 4 \end{bmatrix}[/tex]

[tex]A^4 = \begin{bmatrix} 4 & 3 & 3 & 3 & 3 \\ 3 & 4 & 3 & 3 & 3 \\ 3 & 3 & 4 & 3 & 3 \\ 3 & 3 & 3 & 4 & 3 \\ 3 & 3 & 3 & 3 & 4 \end{bmatrix} \begin{bmatrix} 4 & 3 & 3 & 3 & 3 \\ 3 & 4 & 3 & 3 & 3 \\ 3 & 3 & 4 & 3 & 3 \\ 3 & 3 & 3 & 4 & 3 \\ 3 & 3 & 3 & 3 & 4 \end{bmatrix} = \begin{bmatrix} 52 & 51 & 51 & 51 & 51 \\ 51 & 52 & 51 & 51 & 51 \\ 51 & 51 & 52 & 51 & 51 \\ 51 & 51 & 51 & 52 & 51 \\ 51 & 51 & 51 & 51 & 52 \end{bmatrix}[/tex]

We want the paths between two distinct vertices, so we ignore the entries on the diagonal and take the total of the non-diagonal entries, 20 • 51 = 1020.