Created
July 6, 2013 19:15
-
-
Save wnoizumi/5940918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lowerBound = MST | |
upperBound = todos os vértices conectados na raiz | |
G = (V, E) | |
e[] = sort(E) //as arestas serão usadas para particionar o espaço de soluções | |
bestSoFar = upperBound(G) | |
live[] = branch(e.dequeue()) //aqui gera as possibilidade: 1- com p0, 2 - sem p0 | |
while Live not Empty and time < 1hour { | |
P = live.dequeue() | |
B = branch(P, e.dequeue()) | |
for i in B { | |
LB(i) = lowerBound(i) | |
if LB(i) == S //is a feasible solution S | |
and S < bestSoFar { | |
bestSoFar = S | |
continue | |
} | |
if LB(i) >= bestSoFar { | |
stop branching in i | |
} else { | |
live.enqueue(branch(i)) | |
} | |
} | |
} | |
return bestSoFar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment