All pastes #952612 Raw Edit

Stuff

public text v1 · immutable
#952612 ·published 2008-03-22 11:10 UTC
rendered paste body
let P be the set of paths from room 1 to the exit (room 0)
let E be the bag of edges in P
let freq(e) := the number of times e is found in E

edgecounter = 0
edgesremoved = {}
forall p in P:
   if p is not broken
      remove e in P such that freq(e) > freq(f) forall f in P // remove the most frequent edge
      edgesremoved += {e}
      edgecounter++
      // p is now broken