0

I am trying to have R calculate the minimum cuts of a network. I am having trouble using iGraph's stmicuts command. It produces cuts for certain nodes and the ones it does produce cuts for do not make much sense. For example:

st_min_cuts(net_full, '2', '417', capacity = NULL)

Produces

st_min_cuts(net_full, '2', '346', capacity = NULL)
$value
[1] 2

$cuts
$cuts[[1]]
+ 0/960 edges from 19b17c7 (vertex names):


$partition1s
$partition1s[[1]]
+ 512/525 vertices, named, from 19b17c7:
  [1] 346 515 345 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124
 [26] 123 122 121 120 119 118 117 116 115 114 113 112 111 110 109 108 107 106 105 104 103 102 101 100 99 
 [51] 98  97  96  95  94  93  92  91  90  89  88  87  86  85  84  83  82  81  80  79  78  77  76  75  74 
 [76] 73  72  32  31  28  15  8   4   2   524 520 518 517 516 519 513 512 511 510 509 506 504 503 499 497
[101] 491 487 485 480 478 476 474 469 382 380 379 377 370 368 367 366 364 362 361 358 356 354 349 347 338
[126] 336 332 329 319 318 317 316 315 314 313 312 311 310 309 308 307 306 305 304 303 302 301 300 299 298
[151] 297 296 295 30  27  294 293 292 291 290 289 288 287 286 285 284 283 282 281 280 279 278 277 276 275
[176] 274 273 272 24  23  265 264 263 262 261 260 259 258 257 256 255 254 253 252 251 250 249 248 247 246
[201] 245 244 243 242 241 240 239 238 237 21  20  19  18  269 268 267 266 26  17  16  236 235 234 233 232
[226] 231 230 229 228 227 226 225 224 223 222 221 220 219 218 217 216 215 214 213 212 211 210 209 208 207
+ ... omitted several vertices

I am trying to determine the minimum number of nodes that need to be cut for the source and sink to be disconnected. Any recommendations about how I can fix this issue or find the minimum cuts another way?

mnm247
  • 1
  • 1
  • 1
    It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. What property do cuts that "make much sense" have? – MrFlick Feb 01 '19 at 21:40
  • I was not sure how to add a screenshot. Here is just a straight copy and past of the out put I get. st_min_cuts(net_full, '2', '346', capacity = NULL) $value [1] 2 $cuts $cuts[[1]] + 0/960 edges from 19b17c7 (vertex names): $partition1s $partition1s[[1]] + 512/525 vertices, named, from 19b17c7: [1] 346 515 345 145 144 143 142 141 140 139 138 137 136 135 134 133 132 131 130 129 128 127 126 125 124 [26] – mnm247 Feb 01 '19 at 22:15
  • I am trying to determine the minimum number of nodes that need to be cut to disconnect 2 specific nodes. – mnm247 Feb 01 '19 at 22:17
  • Be sure to follow the suggestions in the link I provided to create a reproducible example. Edit your question to include the relevant information so it can be properly formatted (comments aren't good for important data or code). – MrFlick Feb 01 '19 at 22:24

0 Answers0