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)

1
vote
1answer
138 views

Is there an easy way to specify an arbitrary two-dimensional Polyomino tiling in Mathematica 8.0?

Is there an easy way to generate an arbitrary two-dimensional Polyomino tiling: http://en.wikipedia.org/wiki/Polyomino? Specifically, I would like to generate an array of integer coordinates, for ...
1
vote
1answer
44 views

VertexLabels Options

Suppose I have a graph like this Graph[ {1 <-> 2, 2 <-> 3, Labeled[3 <-> 1, "hello"]}, VertexLabels -> Placed["Name",StatusArea] ] Now ...
1
vote
1answer
29 views

WeaklyConnectedGraphQ evaluates to False. Is this the expected result?

Take the simple graph {1->2, 2->3, 3->1}: TreePlot[{1->2,2->3,3->1}] I would expect that ...
1
vote
2answers
91 views

Graph: ordered vertices

I have tried things like ...
1
vote
1answer
85 views

LayeredGraphPlot: how to specify edge endpoints?

What directive within the LayeredGraphPlot command specifies where the edges attach to vertices? For example, instead of the left output below, I'd like to have the right one. ...
1
vote
1answer
149 views

Importing adjacency matrix from file of 0/1 arrays

Is it possible to import adjacency matrix for graph representation, from simple text file with NxN (rows x columns) of 0s/1s: 0 1 0 0 1 0 1 1 0 1 0 0 0 1 0 0
1
vote
1answer
108 views

Extracting a single weakly connected component from a network of many weakly connected components?

Hello Mathematica friends! I've got a network with thousands of edges and vertices, but not all in one connected component. I'm trying to extract specific connected components from the network, and ...
1
vote
1answer
680 views

Plotting a network or a graph with given coordinates for vertices

I'm new to Mathematica yet have coded a lot in MATLAB. Currently I'm working on a network simulation. My model is implemented in MATLAB, but I need to port it to Mathematica. Here is my question: ...
1
vote
1answer
256 views

How can I create Arguments Maps with Mathematica's graph functions?

I am relatively new to Mathematica, and I would like to know how I could use it to represent an Argument Map, such as those that you generate on online tools such as http://debategraph.org. The ...
1
vote
1answer
306 views

Problem setting up edge rendering function

I have a graph, and I want my EdgeRenderingFunction to colour the edges based on the vertex they originate from. In this toy example, I'm trying to get the edge ...
1
vote
1answer
63 views

Combinatorica and DualPartition function (for a Young diagram)

I am trying to understand how to evaluate the arm and leg functions of a Young tableaux using Mathematica. To do so I need the Combinatorica package. Then apparently the command ...
1
vote
1answer
57 views

Labeling the vertices of a graph

I would like to label the vertices of a complete graph alphabetically. But I am stuck because I don't know how to associate only one vertex to a letter. ...
1
vote
2answers
85 views

What is the correct way to assign and use properties of vertices in graphs?

I'm using Mathematica 10, but I'm having a hard time getting it to do anything useful for network analysis because I'm having a hard time working with node properties and analyzing the graph by its ...
1
vote
1answer
63 views

Graph Edit Distance with Mathematica?

Is there any way to calculate similarity of graphs or the graph edit distance in Mathematica ?
1
vote
1answer
93 views

Finding adjacency matrix of a Mathematica's in-built graph? [closed]

I want to get the adjacency matrix of an in-built graph, say the dodecahedral graph. Naively using AdjacencyMatrix[Dodecahedral] doesn't give it to me. Any ...
1
vote
2answers
114 views

Find all perfect matchings of a Graph

I'm trying to find all perfect matchings for some bipartite graphs. For example ...
1
vote
2answers
61 views

How can I construct a random graph, which is created by adding orientation to a complete graph?

Given a complete graph on N vertices, how can I randomly orient all of its edges? I thought about starting out with CompleteGraph[n], and then somehow transforming ...
1
vote
2answers
76 views

Insert an element to AdjacencyGraph

I'm not able to insert an element to mine AdjacencyGraph. I suppose that i should modify my AdjcencyMatrix: ...
1
vote
2answers
121 views

How do you apply an algorithm individually to an array with many graphs

I have and array with many graphs to which I want to apply an algorithm (below) to each graph in an array that contains all my graphs. ...
1
vote
1answer
192 views

Changing the size of arrows in a directed graph?

How can I change the size of arrows in a directed graph? By default, the arrows are too big and clutter the graph.
1
vote
1answer
169 views

Can degenerating Nicomachus' triangle down to $0$ area by using `Graph` be done?

I noticed a pattern in Nicomachus' Triangle that might be used to reduce the triangle to the number line. If the Edge size could be set to the absolute difference ...
1
vote
1answer
89 views

How to plot graphs with vertices positioned as spread as possible? [closed]

The following code, outputs the graph below: graphList = {{1, 2}, {1, 3}, {1, 4}, {2, 5}, {3, 6}, {4, 7}} Graph[UndirectedEdge @@@ graphList] Is there some way ...
1
vote
2answers
96 views

Add weighted edge to a graph in Mathematica 8

Is it possible to add an edge with a specific weight to a Mathematica Graph object? The function EdgeAdd has no option for the weights, nor the ...
1
vote
2answers
131 views

How can I speed up the export of graphs in DIMACS format?

I'm creating random graphs with suitable properties and exporting them in the DIMACS format. Already, for rather small graphs with, say, ~60k vertices and ~240k edges, ...
1
vote
2answers
94 views

Using Combinatorica`ListNecklaces in v9

I am using Mathematica for visualization of DeBruijn graphs. However, I am having a bit of trouble using ListNecklaces. I want to know how many cyclic shifts of ...
1
vote
2answers
181 views
1
vote
2answers
361 views

Plotting bipartite graph from adjacency matrix

I have an $m\times n$ matrix $A$ representing the adjacencies between the nodes of a bipartite graph. Specifically, the nodes are arranged in two partitions, of $m$ and $n$ nodes respectively, such ...
1
vote
1answer
187 views

How to efficiently distinguish the rewired edges in WattsStrogatzGraphDistribution?

The WattsStrogatzGraphDistribution function is a way to construct random graphs based on Watts and Strogatz small world model. The ...
1
vote
1answer
151 views

Connected components of a graph

I am trying to find the number of connected components of numerous named graphs within Combinatorica. The obvious answer seems to be: ...
1
vote
2answers
201 views

Error changing edge thickness in a GraphPlot

I'm having some problems with the Mathematica graphics inspector. I want to make a graph with the following code: ...
1
vote
1answer
210 views

Recovering vertex names from Combinatorica Graph

According to WRI tech support: Combinatorica functionality is not technically deprecated, though it is our hope that future versions of Mathematica will subsume it entirely by incorporating its ...
1
vote
1answer
32 views

Scan appears to work setting graph properties, but get error on property-read

This is a self-contained version of something a bit bigger - going for brevity. It is a bit synthetic, but there are applications I have in mind where the {{1,2}} will be replaced with real data, more ...
1
vote
1answer
52 views

LayeredGraphPlot how to change color of vertex box

For LayeredGraphPlot how to change the default yellow color? ...
1
vote
1answer
75 views

Lack of arrows in Markov Chain graphs

I'm following this: http://www.wolfram.com/mathematica/new-in-9/markov-chains-and-queues/structural-properties-of-finite-markov-processes.html When I try to graph the Markov chain with Graph[proc] I ...
1
vote
2answers
52 views

How do I import a non-directed graph in graphml format?

I have created a graph with undirected edges, and I'm trying to import it into Mathematica. However, when I import it, I get directed edges. ...
1
vote
1answer
64 views

calculate relationship between cause and effect (rows/columns/delta etc.) on tableform

I tried to enter this Excel (on the right of the picture) information to program. following these codes has been used: ...
1
vote
1answer
40 views

Can I rely on the ordering of the adjacency matrix? [closed]

Suppose I have created a Graph[{1,2..n}, {1->3, etc}], and I take the adjacency matrix of that graph. Can I rely on the fact that the i-th entry in the graph is the i-th node in the matrix? Or maybe ...
1
vote
1answer
76 views

Powerset Animation/Invisible Vertices/Graph Layout

I wanted to visualize the cumulative powerset construction process and came up with two functions: ...
1
vote
1answer
70 views

Constructing an I-graph

I am attempting to build I-graphs in MMA, i.e. the non-Generalized Petersen graphs, and I found some code from Eric Weisstein, but this is now outdated and doesn't run. I have attempted to switch the ...
1
vote
1answer
108 views

VertexLabels, EdgeLabels and the direction of the arrows on a directed graph

I want to have three network types. My plan is to put them together in a figure file via marking them with (a) (b) and (c). The figures that I want to have, have some problems. Here is my code ...
1
vote
1answer
56 views

Adding a title to TreePlot

This is a basic question I am sure, but cannot seem to find the answer in the documentation. Does anyone know how to add a title to a TreePlot?
1
vote
1answer
76 views

Export and Import a list of graphs?

I want to export a list of graphs that come as output to my program. However, I tried exporting all the graphs as graphs using Map and an Export statement with "graph.gml" statement, but got an error. ...
1
vote
1answer
110 views

Coloring vertices according to a function using GraphPlot3D

This question is similar but not identical to a related question called: coloring-vertices-using-graphplot . I need to color the vertices of a graph according to a function, f that is defined on the ...
1
vote
2answers
113 views

Split graph into independent maximal cliques?

Does Mathematica have a method to partition the vertices of a graph into maximal independent subsets, such that each subset generates a complete subgraph? Edit: The partition should be maximal in the ...
1
vote
1answer
48 views

Unexpected behaviour with GraphIntersection and GraphDifference

I run into some unexpected behaviour of GraphIntersection and GraphDifference. Behaviour is the same for both so the example is only on the GraphIntersection: Suppose I have two lists of directed ...
1
vote
1answer
66 views

Importing additional custom data in DIMACS format

I have graphs in DIMACS format, with vertex colors specified. The vertex colors are denoted by lines n u c, where u is the ...
1
vote
1answer
104 views

Using FindGraphCommunities, write community membership for each vertex to CSV

I have a network that I've loaded into Mathematica, and I've used FindGraphCommunitites[network,Method->"Hierarchical"] to identify the communities in the ...
1
vote
1answer
75 views

Get subgraphs: communities of graph g

I have a graph g. I want a set of graphs c which holds the community subgraphs of g. I ...
1
vote
1answer
176 views

Creating an animated graph model based on equations

So I have a graph that looks like this ...