Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica` package.

learn more… | top users | synonyms (2)

7
votes
1answer
880 views

Mathematica: Label specific vertices in GraphPlot

How can I label particular vertices in GraphPlot? And have the arrows space out accordingly, for the width of the label? I have Mathematica 7, but I think this question applies to all versions. ...
9
votes
4answers
452 views

Show path with arrows in a matrix

I have a matrix, for example, 5x5 matrix Partition[Range[25], 5]. And I am given a list, for example: ...
13
votes
4answers
370 views

How can I remove B -> A from a list if A -> B is in the list?

I have a list of transformations like this: list = {"A" -> "B", "B" -> "A", "C" -> "D"} As this is used to plot an undirected graph with ...
14
votes
3answers
3k views

How to generate random directed acyclic graphs?

How to programmatically build random directed acyclic graphs (DAG)? I know about the AcyclicGraphQ predicate and the ...
21
votes
1answer
693 views

Visualizing Rubik's Graph

After the August 2010 discovery that the diameter of the Rubik graph is 20, I wanted to make a way to visualize Rubik's graph. Since there are about $4.3 \times 10^{19}$ vertices in this graph, it is ...
8
votes
1answer
166 views

Using GraphHighlight interactively

I want to build a small GUI, where the user can select either a single edge or a single node of a graph. I got to this point: ...
9
votes
2answers
245 views

VertexSize doesn't scale with Graph layout?

I wonder about how I could make a Graph scale automatically when I vary the size of the vertices. I would like to visualize information with a ...
4
votes
1answer
230 views

Implementing local complements of graphs

I'm trying to write a routine which generates the local complement of a graph at a vertex. For those who don't know, the local complement for a singly-connected, undirected graph is defined as the ...
15
votes
1answer
743 views

How to export and import Graphs with additional data?

I'm trying to export and then later import graphs with additional data added such as VertexLabels and EdgeLabels. When I export ...
21
votes
1answer
888 views

How to create regular (planar) graphs?

How to programmatically create and plot regular planar graphs with $k = 3, 4$ or $6$ (not hypercubes) and regular nonplanar graphs of $k = 8$ (see figure)? Note that what matters is the average ...
15
votes
3answers
225 views

What is the most convenient way to change options for Graph[] objects?

What is the most convenient way to change options such as VertexLabels in existing Graph objects? (Version 7 users note: ...
58
votes
3answers
1k views

Automatically generating a dependency graph of an arbitrary Mathematica function?

Has anyone written a function to pull the function dependencies of a function? That is, it would be nice to have a function that returns a list of function dependencies as a set of rules, terminating ...
5
votes
1answer
227 views

How do I find a weighted bipartite graph's minimum edge cover using Mathematica 8?

In graph theory, we use the Hungarian Algorithm to compute a weighted bipartite graph's minimum edge cover (a set of edges that is incident to every vertices, the one with the minimum total weight.) ...