Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

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

--------------------------

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

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get this solution by purchasing an Individual license!
Start your 7-day free trial.

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.

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

>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.

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.

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 trialhttp://www.youtube.com/watch?v=psg2-6-CEXg

Maybe this one too

http://www.youtube.com/watch?v=UG7VmPWkJmA

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.

Math / Science

From novice to tech pro — start learning today.

Experts Exchange Solution brought to you by

Enjoy your complimentary solution view.

Get this solution by purchasing an Individual license!
Start your 7-day free trial.

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.)