mercredi 6 janvier 2021

Random Adjacency Matrix of a Tree

What is the main idea of implementing a random adjacency matrix of a tree? For the general case graph on n vertices, we take a matrix M of size nxn, let all the entries to be equal to 0 and then randomly set $M[i,j] = 0 or 1$ and $M[j,i] = M[i,j]$. For a tree we have to make two additional constrains. Connectivity and no cycles.

How to do it? Is there some relatively "simple" way?




Aucun commentaire:

Enregistrer un commentaire