Working version of the scheme, with error injection associated with finding minimum routine. Tested for error rate 1E-4, Num-nodes=500