# Getting all possible graphs

I have the following code which gives me some random complete graph

rand = {1, 2, 3};
el = EdgeList[CompleteGraph[5]];
g = CompleteGraph[5, VertexLabels -> "Name",
EdgeLabels -> Table[el[[i]] -> RandomChoice[rand], {i, Length[el]}]]


What I want is to get every possible graph with edges labeled with numbers from rand.

• I wanna get every graph in some sort of cycle like For because every iteration I should do something with the graph I've got. Commented Dec 22, 2021 at 19:01
• Are you sure you need all those labeled graphs? Look at the result of Tuples[{1, 2, 3}, 10], for instance. Commented Dec 22, 2021 at 19:03
• I'm pretty sure I need all of them since I should counts paths in all this graphs. Commented Dec 22, 2021 at 19:11
• To make the hint in my previous comment more explicit: there are $59049$ of those labeled graphs. If you absolutely must, this question might be of interest. Commented Dec 22, 2021 at 19:17
• I feel like we have 3 possibilities for each edge, and are there 3^(10*9/2) (=2954312706550833698643) of those labeled graphs? Of course, a lot of these graphs are isomorphic, and we have to figure out how to get rid of them. Commented Dec 23, 2021 at 2:27