To generate the graphs on 7 vertices, just use the graphs() command (this will take a few seconds).
|
|
1044 |
To get all connected graphs, you can just construct that list from the list you just generated.
|
|
To get pictures of the first 10, just plot the graphs.
|
Now let's get the adjacency matrix of the 200th connected graph (the numbering in the list of connectedgraphs7 starts at zero, so we ask for position 199).
|
|
|
|
[0 1 1 1 0 1 1] [1 0 1 1 0 0 0] [1 1 0 1 0 0 0] [1 1 1 0 1 0 0] [0 0 0 1 0 1 1] [1 0 0 0 1 0 1] [1 0 0 0 1 1 0] |
Then we can do some things with the matrices.
7 |
Now let's explore a centrality measure.
{0: 0.33333333333333331, 1: 0.0, 2: 0.0, 3: 0.15555555555555553, 4:
0.066666666666666666, 5: 0.02222222222222222, 6:
0.02222222222222222}
|
|
|