Q12
MCQMarks unknownFill in the blanks in the following template of an algorithm to compute all pairs shortest path lengths in a directed graph with adjacency matrix . equals if there is an edge in from to , and otherwise. Your aim in filling in the blanks is to ensure that the algorithm is correct. INITIALIZATION: For i = 1 ... n {For j = 1 ... n { if a[i,j] = 0 then P[i,j] =_______ else P[i,j] =_______;} } ALGORITHM: For i = 1 ... n {For j = 1 ... n {For k = 1 ... n {P[__,__] = min{_______,______}; } } }
Sign in to save attempts.
Loading…