Using this formula
W[i,j,k+1]=W[i,j,k]+W[i,k+1,k]*W[K+1,j,k]
How would I solve
W[i][j][3].
Note: I am not programming this. I just need to solve by hand.
help with warshall formula
Started by gammaman, Mar 23 2009 08:09 AM
4 replies to this topic
#1
Posted 23 March 2009 - 08:09 AM
|
|
|
#2
Posted 23 March 2009 - 09:10 AM
Well, applying the formula once gives:
W[i,j,3] implies k=2
W[i,j,3] = W[i,j,2] + W[i,3,2]*W[3,j,2]
Now we need to solve W[i,j,2] which implies k=1; W[i,3,2] which implies k=1; and W[3,j,2] which implies k=1.
I wasn't able to find that exact formula, which raises the issue that there must be certain values of k where a different formula applies.
W[i,j,3] implies k=2
W[i,j,3] = W[i,j,2] + W[i,3,2]*W[3,j,2]
Now we need to solve W[i,j,2] which implies k=1; W[i,3,2] which implies k=1; and W[3,j,2] which implies k=1.
I wasn't able to find that exact formula, which raises the issue that there must be certain values of k where a different formula applies.
#3
Posted 23 March 2009 - 11:15 AM
Looking at this example
W[1,2,1]=W[1,2,0]+W[1,1,0]*W[1,2,0]
then, 1 + 0*1 =1
were does 1 + 0* 1 come from. I mean obviously it comes from the above formula, but it does not seem obvious to me as to how we know the choose the 1,0 and 1.
W[1,2,1]=W[1,2,0]+W[1,1,0]*W[1,2,0]
then, 1 + 0*1 =1
were does 1 + 0* 1 come from. I mean obviously it comes from the above formula, but it does not seem obvious to me as to how we know the choose the 1,0 and 1.
#4
Posted 23 March 2009 - 11:30 AM
As I said: you HAVE TO have boundary conditions. The formula you provided is not the complete formula.
#5
Posted 23 March 2009 - 11:40 AM
Well this is the formula our professor gave us. I appreciate your help. All I really need to know is where the 1+0*1 came from. Because based on what I had in the previous post it looks like for some reason we are choosing i then k then k+1.


Sign In
Create Account


Back to top









