Learn the fundamentals of the popular programming language JavaScript so that you can explore the realm of web development.

Hi guys: Can any one please tell me how to make a graph base on these values ? Thanks

X 2 3 X 2 4 X

X 2 9 X 1 3

X X 2 2 2

X 7 X 9

X 2 X

X 1

X

X 2 3 X 2 4 X

X 2 9 X 1 3

X X 2 2 2

X 7 X 9

X 2 X

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.

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

0 X 2 3 X 2 4 X

1 X 2 9 X 1 3

2 X X 2 2 2

3 X 7 X 9

4 X 2 X

5 X 1

6 X

Do i need to assign a serial number?

For example the first number is X ? I am sorry i dont get it.

Okay. Draw 7 vertices and label them 0-6. Then draw edges everywhere you see a number on the graph.

For example, on row 3 column 4 is a 7. So draw an edge from vertex 3 to vertex 4 and give it a weight of 7. Then just do that with the whole table.

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

0 X 2 3 X 2 4 X

1 X 2 9 X 1 3

2 X X 2 2 2

3 X 7 X 9

4 X 2 X

5 X 1

6 X

I am not understanding if the shape of the graph can be a hexagone shape? or is it suppose to be a natural? some thing else

gr3.jpg

The "shape" is practically irrelevant at a technical detail level. The nodes could be in a straight line, around a circle or randomly placed on a page. It is the way the nodes are connected that is most important.

Of course, once connections are shown, it might be determined that a different arrangement is more practical and possibly more comprehensible.

Tom

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

0 X 2 3 X 2 4 X

1 X 2 9 X 1 3

2 X X 2 2 2

3 X 7 X 9

4 X 2 X

5 X 1

6 X

From that, I see that an edge connects nodes (0,1) with weight 2. I also see that you drew an edge between nodes 0 and 1 on your graph and that you marked it with "2". So far, so good.

But above I see that nodes (0,2) should be connected with an edge with weight 3. But you haven't drawn an edge between 0 and 2 on your graph. Instead, you continued the connection from node 1 to 2 and marked it with "1".

Do you see the difference?

Also above, I see that an edge should connect nodes (1,2) with weight 2. But you already drew an edge and marked it with "1".

Also above, I see that nodes (2,3) should not have an edge between them, since we see X in the table at that intersection. But your graph is drawn with an edge that is not marked. That edge shouldn't be there at all.

Is that making more sense?

Note that this should start to illustrate why the "shape isn't very relevant yet.

Tom

You can draw them any way you like. Just put the right numbers in there. Drawing the points in a hexagon shape is just nice because it makes it easier to see all the lines. You can do it any way you like.

Note: Do not draw the whole hexagon. Just put the points there. 2 and 3 are not connected. Do not draw that edge.

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

0 X 2 3 X 2 4 X

1 x X 2 9 X 1 3

2 x x X X 2 2 2

3 x x x X 7 X 9

4 x x x x X 2 X

5 x x x x x X 1

6 x x x x x x X

Can experts please tell me if there any mistake in it? Thanks.

new.jpg

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.

So node 1 is connected to nodes 2, 3, 5, and 6 with edges of 2, 3, 2, and 4 respectively.