It is a somewhat unusual query, however I’ve used Washall’s algorithm in Graph Concept fairly a bit on varied matrices (representing graphs) to search out least price paths and matrices that mirror these weights.
Nonetheless, I used to be questioning if there’s any customary answer/notation for recording a path for the related weight as properly whereas utilizing Washall’s algorithm?
For instance I considered modifying Washall’s algorithm as seen beneath:
Let W be the matrice I’m utilizing Washall’s algorithm on. Let M be a matrix of dimension n,n such that it might probably retailer the related paths. These paths can be saved as lists of integers within the matrix, such that every index shops the least price path between nodes.
For ok = 1 to n For i = 1 to n For j = 1 to n If (W[i,j] > W[i,k] + W[k,j]) Then # replace with new least price weight W[i,j] = W[i,k] + W[k,j] # and replace the matrice M to retailer the least price path M[i,j] = M[i,k] + M[k,j]
This then would output an extra matrix M with least price paths. This, nevertheless, appears very crude and unconventional.
Nonetheless, absolutely mathematicians working this algorithm need to know the paths to the least price weights? What do they usually do?