par sos-math(21) » mar. 8 sept. 2020 19:13
Bonjour,
pour une matrice d'adjacence, il faut considérer la matrice comme un tableau en rajoutant une ligne et une colonne qui correspondent aux sommets :
\(\begin{matrix}
& \begin{matrix}P&Q&R&S&T\end{matrix} \\\\
\begin{matrix}P\\\\Q\\\\R\\\\S\\\\T\end{matrix} &
\begin{pmatrix}0&1&1&0&0\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\end{pmatrix}\\\\
\end{matrix}\)
Puis tu parcours chaque sommet en regardant ses sommets adjacents.
Bonne continuation.
Bonjour,
pour une matrice d'adjacence, il faut considérer la matrice comme un tableau en rajoutant une ligne et une colonne qui correspondent aux sommets :
\(\begin{matrix}
& \begin{matrix}P&Q&R&S&T\end{matrix} \\\\
\begin{matrix}P\\\\Q\\\\R\\\\S\\\\T\end{matrix} &
\begin{pmatrix}0&1&1&0&0\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\ldots&\ldots&\ldots&\ldots&\ldots\\\\\end{pmatrix}\\\\
\end{matrix}\)
Puis tu parcours chaque sommet en regardant ses sommets adjacents.
Bonne continuation.