[EM] Election-methods digest, Vol 1 #388 - 7 msgs
Markus Schulze
markus.schulze at alumni.tu-berlin.de
Sat Dec 20 23:50:01 PST 2003
Dear Matt,
you wrote to Mike Ossipoff (20 Dec 2003):
> To restore some credibility for yourself Mike, how about arranging
> to correct the code to make it O(N^3)? All this time Mike is
> wasting futiley trying to beat down Markus could be better spent
> by soliciting help from someone who codes python to modify the
> code. Then again, your attacks on Markus are so completely false
> and nasty that I really doubt there is anything you can do to
> restore your credibility with me.
Mike Ossipoff wrote (18 Dec 2003):
> repeat = 1
> while repeat = 1:
> change = 0
> for i = 1 to N
> for j = 1 to N
> for k = 1 to N
> least = min(B(i,j), B(j,k))
> if least > B(i,k):
> B(i,k) = least
> change =1
> endif
> endfor
> endfor
> endfor
> if change= 0
> repeat = 0
> endif
> endwhile
A compromise would be to write:
> repeat = 1
> while repeat = 1:
> change = 0
> for i = 1 to N
> for j = 1 to N
> for k = 1 to N
> least = min(B(j,i), B(i,k))
> if least > B(j,k):
> B(j,k) = least
> change =1
> endif
> endfor
> endfor
> endfor
> if change= 0
> repeat = 0
> endif
> endwhile
Here the professional mathematicians are satisfied because
it is garanteed that the triple-loop is passed only twice.
And those who don't have sufficient mathematical skills
to trust the Floyd algorithm have the while-loop as an
additional guaranty that the algorithm gives the correct
results.
Markus Schulze
More information about the Election-Methods
mailing list