# Re: [mike ossipoff <ossipoff2002@yahoo.com>] Cloneproof SSD program, with balloting

Dear Manoj,
the Floyd algorithm to calculate the beat paths from
each candidate to each other candidate looks as follows
(Markus Schulze; 17 Oct 2002):
> for (i : = 1; i <= NumberOfCandidates; i++)
> for (j : = 1; j <= NumberOfCandidates; j++)
> for (k : = 1; k <= NumberOfCandidates; k++)
> {
> s : = min(P(j,i),P(i,k));
> if (s > P1(j,k)) then
> P1(j,k) : = s;
> }
However, Mike Ossipoff wrote (31 Oct 2002):
> for i in range(N)
> for j in range(N)
> for k in range(N)
> low=min(B[A(i,j)],B[A(j,k)]
> if low>B[A(i,k)]
> B[A(i,k)]=low
> change=1
The order of the indices is NOT irrelevant! Only when
one uses the same order that I use in my implementation,
it is guaranteed that one has to apply the triple loop
only once! The Floyd algorithm can be found in every
book on graph theory.
Markus Schulze

**Reply to:**