What does this means

Hi guys: Can any one please tell me what does this means?  Thanks
----------------------------------------------------------------------

The second matrix is simply the symmetric version of the first.

This

   1 2  3  4  5  6  7
1 0 2  3  x  2  4  x
2    2  3 11 2 3  5
3        3  9  2 3  5
4        3  9     3  5
5            9     3  4
6            8         4
7            8

is simply the running of Dijkstra's algorithm
-------------------------------------------------------


1st Matrix
  1  2  3  4  5  6  7
1  x  2  3  x  2  4  x
2     x  2  9  x  1  3
3        x  x  2  2  2
4           x  7  x  9
5              x  2  x
6                 x  1
7                    x

2nd Matrix
-----------
  1  2  3  4  5  6  7
1 x  2  3  x  2  4  x
2 2  x  2  9  x  1  3
3 3  2  x  x  2  2  2
4 x  9  x  x  7  x  4
5 2  x  2  7  x  2  x
6 4  1  2  x  2  x  1
7 x  3  2  4  x  1  x
mustish1Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TommySzalapskiCommented:
Okay. That first "matrix" you have is showing the results of the step by step running of Dijkstra's Algorithm on the second matrix. The third matrix is just the first one uncompressed.

The first "matrix" is showing the results for vertex 1. So initially, the distance from vertex 1 to all the others is shown in the first row. Then the rest shows how the data changes as the algorithm runs. So the final "row" is 0 2 3 8 2 3 4
So the shortest paths from vertex 1 to each of the other vertices is there. (The shortest path from 1 to 4 is 8 units long etc.)
0
mustish1Author Commented:
>That first "matrix" you have is showing the results of the step by step running of Dijkstra's Algorithm on the second matrix

I create a graph on first matrix and thats how i get the values in the second matrix.

My problem is this matrix as I dont understand how this one was created
----------------------------------------------------------------------

This

   1 2  3  4  5  6  7
1 0 2  3  x  2  4  x
2    2  3 11 2 3  5
3        3  9  2 3  5
4        3  9     3  5
5            9     3  4
6            8         4
7            8

is simply the running of Dijkstra's algorithm
2ndmatrix.jpg
0
mustish1Author Commented:
>So initially, the distance from vertex 1 to all the others is shown in the first row. Then the rest shows how the data changes >as the algorithm runs. So the final "row" is 0 2 3 8 2 3 4
>So the shortest paths from vertex 1 to each of the other vertices is there. (The shortest path from 1 to 4 is 8 units long etc.)


CAN YOU PLEASE TELL ME STEP BY STEP INSTRUCTION TO RUN Djkastro algorithm on this matrix

0  2  3  x  2  4  x

How i get upto 8

Thanks.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

TommySzalapskiCommented:
Okay. On your paper in the image you have vertices labelled 0 - 6. In the question you labelled them 1 - 7. This is going to cause some confusion.

Anyway, the matrix in question is not really a matrix. It's just showing how the first row changes as you run the algorithm.

From your paper. Start at vertex 0. The distance to each other vertex is shown below (X means can't get there).

0  1  2  3  4  5  6
0  2  4  X  2  4  X

This is also the first row.
That's only for one edge though. If you look, you can get to vertex 3 (from 0) by going 0 to 1 to 3 which has a total weight of 2+9=11 and you get get to 6 by going from 0 to 2 to 6 (weight of 5)

So the second row shows
0  1  2  3  4  5  6
0  2  4  X  2  4  X
0  2  4 11 2  4  5

If you keep going though, you can find shorter paths. Pull the bottom number off of each column and you get

0  1  2  3  4  5  6
0  2  4  8  2  3  4

This represents the shortest path from vertex 0 to each of the other vertices.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mustish1Author Commented:
I am sorry for that. I am start working to paper to make a graph. Thanks.
0
TommySzalapskiCommented:
Here, watch this video. It will help you.
http://www.youtube.com/watch?v=psg2-6-CEXg
Maybe this one too
http://www.youtube.com/watch?v=UG7VmPWkJmA
0
mustish1Author Commented:
Thanks Tommy. Can you also please tell me that if i have to solve djkastra theorem on this matrix
1st Matrix
  1  2  3  4  5  6  7
1  x  2  3  x  2  4  x
2     x  2  9  x  1  3
3        x  x  2  2  2
4           x  7  x  9
5              x  2  x
6                 x  1
7                    x

First i make a diagram based on these values then i run the djkastra algorithm on that diagra. The way i did this before. I just want to make sure this is the right way to solve questions like this.
0
TommySzalapskiCommented:
You don't have to make a diagram to do the algorithm. You can just do it on the matrix, but if the diagram is easier for you, then it works well also.
0
mustish1Author Commented:
How i know what is end or which point is end?
0
TommySzalapskiCommented:
You just keep doing the algorithm until you have the shortest path to every vertex.
0
TommySzalapskiCommented:
So you just stop when you have looked at each vertex once.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Math / Science

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.