Software to find out adjacency matrix of a graph.

1.8k Views Asked by At

I am looking for a graph theoretical software. I can draw a graph delete or add its vertices and edges whatever I want. The software shall give me the Adjacency matrix, degree matrix etc.

Is such a software exists? If available please provide its name and publisher.

Anyhow how can I implement it in C or C++?

I am currently using Matlab, but it is not much helpful.

Thank you for your help.

2

There are 2 best solutions below

8
On BEST ANSWER

I wrote some software in Matlab for this task for my own purposes, and it is available for download from my website: Graph Manager. It was designed to work with Matlab 6.5 (the only version I own which was released over 10 years ago) and you should unzip it and run it with graphm from inside the created directory. It should look like this:

graphm1

You can use the mouse to add/delete vertices and edges and do other things. Since it was for my use there are probably a few things that are unclear, feel free to ask here if there is a problem.

Since it was mainly used to look at graphs on the torus you will need to switch that off if you see the green box; you do that with "Save/Disp" and the "shape" submenu. To get the adjacency matrix you can just go to the main Matlab window and it will be in the global variable A.

5
On

You can use sage, http://www.sagemath.org/. Suppose, for example, to find the adjacent matrix of $K_5$, then the following program will find it for you.

sage: g= graphs.CompleteGraph(5)

sage: g.adjacency_matrix()

The manual is here http://www.sagemath.org/doc/reference/graphs/sage/graphs/generic_graph.html