I'm trying to solve the minimum vertex cover problem using the Brute-Force Approach, basically trying every combination of edges of a graph to find the minimum.
I have a nested for loop that I want to run parallel
Say I have the following code so far:
def brute_force_MVC(vertices, edges):
bin_input=["000","001","010","011","100","101","110","111"]
for case in bin_input:
for i, vertex in enumerate(vertices):
if case[i]:
#do stuff
for edge in edges:
#do more stuff
is there a way to parallelize this? instead of running each case one after the other, could i run them parallel? Would that speed things up?