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
minimize | |
OBJ: +20 x1 +73 x2 +100 x3 +47 x4 +37 x5 +70 x6 +51 x7 +61 x8 +94 x9 +58 x10 +94 x11 +81 x12 +76 x13 +18 x14 +10 x15 +29 x16 +27 x17 +44 x18 +94 x19 +18 x20 +29 x21 +39 x22 +85 x23 +83 x24 +16 x25 +52 x26 +40 x27 +79 x28 +75 x29 +47 x30 +96 x31 +24 x32 +21 x33 +77 x34 +94 x35 +4 x36 +27 x37 +40 x38 +7 x39 +95 x40 +61 x41 +63 x42 +81 x43 +89 x44 +6 x45 +58 x46 +35 x47 +44 x48 +92 x49 +17 x50 +29 x51 +48 x52 +99 x53 +66 x54 +21 x55 +88 x56 +96 x57 +62 x58 +6 x59 +55 x60 +37 x61 +14 x62 +11 x63 +15 x64 +1 x65 +35 x66 +32 x67 +69 x68 +29 x69 +19 x70 +26 x71 +44 x72 +17 x73 +2 x74 +94 x75 +44 x76 +38 x77 +100 x78 +32 x79 +75 x80 +16 x81 +87 x82 +13 x83 +64 x84 +23 x85 +3 x86 +35 x87 +12 x88 +90 x89 +98 x90 +83 x91 +30 x92 +41 x93 +93 x94 +2 x95 +89 x96 +2 x97 +73 x98 +8 x99 +59 x100 +2 x101 +84 x102 +76 x103 +12 x104 +60 x105 +81 x106 +35 x107 +44 x108 +57 x109 +32 x110 +69 x111 +14 x112 +49 x113 +71 x114 +86 x115 +96 x116 +44 x117 +65 x118 +38 x119 +17 x120 +6 x121 +85 x122 +89 x123 +100 x124 +36 x125 +5 |
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
import networkx as nx | |
import os | |
import numpy as np | |
import time | |
import random | |
def mvc(graph): | |
cost = {u:1 for u in range(graph.number_of_nodes())} | |
for u,v in graph.edges: | |
min_cost = min(cost[u], cost[v]) |
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
# Reuters-21578 dataset downloader and parser | |
# | |
# Author: Eustache Diemert <eustache@diemert.fr> | |
# http://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html | |
# | |
# Modified by @herrfz, get pandas DataFrame from the orig SGML | |
# License: BSD 3 clause | |
from __future__ import print_function |