Generating all non-isomorphic graphs for a given number of nodes with specified degrees
3 ビュー (過去 30 日間)
古いコメントを表示
I would like to generate the set of all possible, non-isomorphic graphs for a given number of nodes (n) with specified degrees. Such graphs are relatively small, they may have n = 1-8 where the degree of nodes may range from 1-4.
Generated graphs must be allowed to contain loops and multi-edges. Here, multi-edges have a max value of 2, that is any two nodes may be connected to eachother by a maximum of 2 edges, they may also be connected by 1 edge or 0 edges.
E.G. Generate all possible graphs (thay are allowed to contain loops and multi-edges) with 4 nodes (n = 4) where 2 of the nodes have the degree 2 (2-connected) and two of the nodes have the degree 3 (3-connected).
I have worked this out on paper, there should be 11 different graphs.
Is there an efficient way to generate all possible graphs (with restrictions listed above) with n nodes where the degree of each node is specified ?
Thanks!
-Maxwell Day
0 件のコメント
回答 (1 件)
Christine Tobler
2020 年 11 月 24 日
I've attached a script that computes the graphs in your example, here's the plot of all graphs it found:
10 件のコメント
Christine Tobler
2020 年 11 月 30 日
k must also be less than e, since we are splitting up the number of edges into k edges, and then e-k other edges. The error is because e-k becomes negative.
参考
カテゴリ
Help Center および File Exchange で Graph and Network Algorithms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!