Firstly, I would like to mention that I have a 3 GB drum.
I am working on an algorithm that is exponential in time on nodes, so for it I have in code
perm = list( itertools.permutations(list(graph.Nodes)))
which generates all the combinations of vertices in the list, and then I can work on one of the permutations.
However, when I run the program for 40 vertices, it gives a memory error.
Is there an easier way in the implementation through which I can generate all combinations of vertices and not have this error.
user506710
source
share