1 votes 1 votes Find the missing statement in the if loop of $Floyd$ algorithm. Procedure Floyd: (var A: array[1...n,1...n] of real; C: array [1...n,1...n] of real); Var i, j, k: integer; begin M for i:=l to n do for j:=l to n do A[i,j]: =C[i,j] for i:=l to n do A[i,j ]:=0 ; for k:= l to n do for i:=l to n do for j:= l to n do if A[i,j] > A[i,k]+A[k,j] then ____________________ end ; $A[i,j]: = A[i,k] + A[k,j]$ $A[i,j]: = A[i, j] + A[k,j]$ $A[i,j]: = A[j,k]+ A[j,i]$ $A[i,j]: =A[i,k] + A[i,j]$ GATE tbb-mockgate-1 algorithms graph-algorithms shortest-path + – Bikram asked Jan 16, 2017 • retagged Jan 9, 2020 by Arjun Bikram 571 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
Best answer 3 votes 3 votes In Floyd-Warshall's algorithm if we have A[i,j] > A[i,k]+A[k,j] then we assign A[i,j] = A[i,k]+A[k,j]. So (A) Gaurab Ghosh answered Jan 16, 2017 • selected Feb 7, 2017 by Bikram Gaurab Ghosh comment Share Follow See all 3 Comments See all 3 3 Comments reply smartmeet commented Jan 21, 2017 reply Follow Share How to approach direct questions, do we need to mug up? 0 votes 0 votes Bikram commented Feb 7, 2017 reply Follow Share @smartmeet No need to Mug up, you need to know how Floyed Warshall Algorithm works.. and have to understand the given question . 0 votes 0 votes Nit9 commented Feb 11, 2017 reply Follow Share see the recursive equation for floyd algo 0 votes 0 votes Please log in or register to add a comment.