Re: [algogeeks] Floyd Warshall

2012-03-03 Thread karthikeyan muthu
consider the loop as rep(k,n) rep(i,n) rep(j,n) if(dp[i][k] && dp[k][j])dp[i][j]=min(dp[i][j],dp[i][k]+dp[k][j]) here we take one node (first for loop) and check if the cost of moving from i->j gets reduced on choosing k as intermediate node. On Sat, Mar 3, 2012 at 6:26 PM, saurabh singh wrote:

Re: [algogeeks] Floyd Warshall

2012-03-03 Thread saurabh singh
Its quite trivial..it just if there's a shorter way to reach from index j and k by using any of the nodes as intermediate Saurabh Singh B.Tech (Computer Science) MNNIT blog:geekinessthecoolway.blogspot.com On Sat, Mar 3, 2012 at 5:59 PM, shady wrote: > Can someone explain Flyod Warshall al

[algogeeks] Floyd Warshall

2012-03-03 Thread shady
Can someone explain Flyod Warshall algorithm, i am unable to understand how it works ? even a good link will suffice, i am not getting the intuition behind it. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email