Created
February 10, 2015 22:20
-
-
Save bantmen/e777bc7b7c8eb986b26b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| made_change = True | |
| While made_change: # continue while any change is possible | |
| made_change = False # see if any changes are still possible | |
| For all edges (u,v) in E: | |
| If u in S AND v in T AND f(u,v)<c(u,v): | |
| S = S ∪ {v} # move v from T to S | |
| T = T - {v} | |
| made_change = True | |
| Else If u in T AND v in S AND f(u,v)>0: | |
| S = S ∪ {u} # move u from T to S | |
| T = T - {u} | |
| made_change = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment