PROCEDURE WARSHAL (N:INTEGER ; A:GYORETSU ; VAR R:GYORETSU ) ; VAR I,J,K : INTEGER ; BEGIN (*WARSHAL*) FOR I:=1 TO N DO FOR J:=1 TO N DO R[I,J]:=A[I,J] ; FOR K:=1 TO N DO FOR I:=1 TO N DO FOR J:=1 TO N DO IF (R[I,K]=1) AND (R[K,J]=1) THEN R[I,J]:=1 END ;