I want to create a generator which will create graphs with eulerian circuit (in Python). It must have P % of maximum edges possible. I already know that all vertices in graphs with eulerian circuit must have even degree. I was thinking of creating random path and when the number of edges will reach P % i would connect the last vertex with the first one. However, it is not that random as I would like it to be. Is there any better approach to solve this problem?
Aucun commentaire:
Enregistrer un commentaire