Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica` package.
4
votes
1answer
173 views
Counting the size of the minimum cut produced by MinCut of GraphUtilities`
I want to use the MinCut function of the GraphUtilities` package to find minimum cuts for a few graphs. I'm completely new to ...
4
votes
1answer
508 views
When do I use Mathematica, when do I use Gephi, and how do I use them together?
Mathematica has great operations for analyzing graphs but when the graphs are a bit bigger, Gephi seems to be more efficient (at least on my computer) at drawing and analyzing, i.e. visualizing the ...
6
votes
3answers
302 views
Graph adjacency matrix with unconnected nodes
I am trying to display a series of 9x9 adjacency matrices which represent directed graphs on a 3x3 grid. The issue I am running up against is this (compounded by that fact that I don't really know how ...
19
votes
1answer
907 views
Is there a way to convert an image into a Graph?
I'm trying to convert an image with several overlapping dots into a Graph. The goal is to be able to derive the Kirchhoff matrix for the randomly created "network ...
2
votes
2answers
120 views
Is it possible to use PropertyValue to modify properties of Graph objects in a list?
This post can be seen as a follow up to Property assignment on a graph vertex using PropertyValue does not work inside a function.
I have defined a function:
...
2
votes
0answers
157 views
How to predict some constant number of values with NeuralNetworks
Example:
<< NeuralNetworks`
data = {Sin[#]} & /@ Range[0, 4 Pi, 0.5];
learn = data[[1 ;; 15]];
Now, lets fit our neural network:
...
9
votes
2answers
343 views
Creating a graph with variable size of vertices and variable thickness of edges
I'm trying to create a graph to represent transitions between different states of a system. I would like to represent the time the systems spent in a state with the size of the vertex and the ...
14
votes
1answer
411 views
Graph vs GraphPlot
What is the difference (in purpose) between Graph and GraphPlot? Which function is bested suited to which tasks?
Background: I ...
7
votes
2answers
283 views
Controlling TreePlot (and GraphPlot) layout issue
A continuing battle with Mathematica involves graphics heavy with text labels. For example, the following expression renders so that the "Lifecycle properties..." ...
1
vote
0answers
121 views
How do I reorder vertices in a graph?
I have a directed acyclic graph $g$, and I'd like to re-order the vertices in this graph object such that when I call
VertexList[myGraph]
the vertices appear in ...
10
votes
1answer
169 views
Issue with PathGraph
I am having a strange issue with PathGraph. Executing
PathGraph[{a, b, c}]
or ...
4
votes
0answers
159 views
How to compute the genus of a Graph?
What's the simplest way to compute the genus of a graph using Mathematica? I have looked for a Genus function (even in the ...
6
votes
1answer
123 views
Vertices, their labels, and how to refer to them?
In the examples I have seen, graph vertices in Mathematica are usually explicit small integers. However, Wolfram documentation says that vertices can be any arbitrary expression (eg., george, x^2, ...
17
votes
4answers
503 views
How can I replace bi-directional DirectedEdge pairs in a Graph with a single UndirectedEdge?
The Cayley graphs produced by Mathematica 8.0's CayleyGraph function represent actions that are their own inverses in an unconventional way: rather than using a ...
10
votes
2answers
270 views
Select a directed SubGraph without sinks and sources
Consider the following problem: Assume you have a large list of directed edges, that constitute a large graph. I would like to provide an initial subset of vertices and I need to know which additional ...
11
votes
1answer
178 views
Ulam's Spiral with Opperman's diagonals (quarter-squares)
First we craft a function to return the quadrant boundary based on Oppermann's Conjecture
a[n_] := (Mod[n, 2] + n^2 + 2 n)/4
Then we create a few lists
...
5
votes
3answers
148 views
Rendering polygon as graph with directed edges in Mathematica
In Mathematica I'm trying to render a polygon as a set of vertices and directed edges.
What I have so far:
...
8
votes
2answers
216 views
How do I convert this Nicomachus's Triangle to one with edges?
I want to put edges on this Nicomachus's Triangle
r = 7;
t = Table[2^(n - k) 3^k, {n, 0, r}, {k, 0, n}];
ColumnForm[t, Center]
Is there an easy way to do this?
...
10
votes
2answers
210 views
Using Gather to rearrange my data
I have a list of elements:
{{1, 2}, {1, 5}, {2, 6}, {3, 7}, {4, 8}, {5, 6},
{5, 9}, {9, 13}, {10,11}, {11, 12}, {11, 15}, {15, 16}}
I have to divide it into ...
6
votes
2answers
185 views
Efficient setting of properties of multiple vertices in Graph
The functions SetProperty and PropertyValue can only set a single property of a single vertex, as far as I know. How do I set a ...
6
votes
1answer
101 views
Property assignment on a graph vertex using PropertyValue does not work inside a function
I created this function:
AddStone[board_Graph, v_, s : white | black | empty] :=
PropertyValue[{board, v}, VertexState] = s
This function should change the ...
13
votes
3answers
336 views
Determining all possible traversals of a tree
I have a list:
B={423, {{53, {39, 65, 423}}, {66, {67, 81, 423}}, {424, {25, 40, 423}}}};
This list can be visualized as a tree using ...
7
votes
2answers
240 views
HighlightGraph with different styles
I want to highlight two different directed paths on a graph with two different style. I am using the following two code snippets:
...
4
votes
1answer
138 views
Removing edge weights from a Graph
How can I remove EdgeWeights from a Graph without affecting any other properties of the graph?
Let's construct a graph with ...
5
votes
3answers
414 views
Random Geometric Graphs
I'm trying to implement an application which uses random geometric graphs in Mathematica, but it seems Mathematica lacks the functionality. I need the following functionalities:
Generate a set of ...
14
votes
2answers
445 views
Graph layout on a grid
Is it possible for Mathematica to layout a graph so that the connections lie on a grid? Furthermore, for graphs with multiple edges per vertex, is it possible to specify the location on the vertex ...
32
votes
2answers
9k views
How can I use Mathematica's graph functions to cheat at Boggle?
This question is inspired by a Stack Overflow question that I decided to solve using Mathematica. In addition to Mathematica, I thought I'd use some of the new version's graph-related functionality, ...
4
votes
1answer
367 views
Is it possible to generate a Hasse Diagram for a defined relation?
I'm looking for a way to create a Hasse Diagram from a given partial order binary relation.
The relation will be given explicitly, for example: ...
4
votes
0answers
195 views
How to visualize large graphs with directed edge bundling
I'm wondering if anyone has implemented edge bundled graph plotting?
http://www.win.tue.nl/~dholten/papers/forcebundles_eurovis.pdf
3
votes
3answers
458 views
How to draw a directed graph with arrows showing vertically from bottom to top
If I have a directed graph, how can I draw it with arrows pointing vertically from bottom to top, like showing a class inheritance pattern in OOP(object oriented programming)?
6
votes
2answers
169 views
Visualize the output of Trace in a tree structure
The output of Trace[expr] can be nicely represented as a tree, I guess.
Here is an example trace.
...
14
votes
1answer
281 views
When to use built-in Graph/GraphPlot vs. Combinatorica
What are the pros and cons of using built-in Graph/GraphPlot (and related) types vs. types in the Combinatorica package?
3
votes
1answer
168 views
Combinatorica Graph from Edge List
Can someone provide an example of a Combinatorica-based graph which uses ShowGraph and Graph and takes in an explicitly defined list of edges (not some auto-generated graph). I have not been able to ...
3
votes
1answer
114 views
How do I get VertexList to work directly on older graphs defined using rules?
In MMA 8, it seems that sometimes VertexList will work with rule-based graphs without needing GraphUtilities and at other times it won't. Once it starts working, it ...
6
votes
3answers
105 views
Is it possible to make more room in a graph layout for my VertexRenderingFunction?
Consider the graph produced by:
...
12
votes
1answer
349 views
Drawing Graph Products
I need to draw graphs that are Cartesian products of 2 graphs. I need them to look like this: .
So each copy of the factors can have LinearEmbedding, but the whole ...
14
votes
1answer
299 views
Need tips on improving this directed graph
First we define a function that returns the least odd prime factor.
lopf[n_] := FactorInteger[n][[2, 1]]
Then we craft a routine that performs the 3x+1 steps ...
12
votes
2answers
220 views
Comfortable Edge Labeling of Undirected Graph
I'm working on a program that finds special [called "interval"] edge-colorings for graphs. Output is as follows:
...
13
votes
3answers
396 views
How to find all vertices reachable from a start vertex following directed edges?
How to find all vertices reachable from a given start vertex following directed edges, in a cyclic directed graph given as
...
5
votes
1answer
244 views
Visualizing the output of a Voronoi diagram computation
I need to plot a graph (to be specific: Fortune Algorithm output) with given vertex coordinates and a few unconnected vertices. I am thinking of using Mathematica for that.
...
10
votes
1answer
116 views
Figuring out how AbsoluteOptions works with Graphs
I am puzzled by how AbsoluteOptions works with Graph objects. I would have expected that one could use it to obtain all the ...
12
votes
3answers
310 views
How to recompute the layout of a Graph?
I asked a question about changing Graph properties in a similar way to how Show can change ...
8
votes
2answers
159 views
Graph does not accept Property Options
My question is concerned with the Graph functionality, which was newly implemented in Mathematica 8. I already used GraphPlot ...
14
votes
3answers
728 views
How to get graph layout that reflects edge weights?
My heart soared to discover that Mathematica 8 offers support for specifying a weighted adjacency matrix in WeightedAdjacencyGraph. But it seems that, regardless of the weights between edges, the ...
5
votes
2answers
231 views
Coloring edges in GraphPlot
I'm a little stuck with graph drawing part of my research — I can't use the Graph function for plotting my graphs, because my graph is a multi-graph. ...
5
votes
0answers
65 views
Graph relationships between functions and variables [duplicate]
Possible Duplicate:
Has anyone written any function to automatically build a dependency graph of an arbitrary Mathematica function?
I need to make sense out of a huge notebook (17Kloc) ...
5
votes
3answers
218 views
How to display edge labels above edges?
The following code shows that edge labels "cover" edges in GraphPlot3D
...
11
votes
1answer
376 views
How to divide a graph into connected components?
Suppose I have some edges:
edges = {1 -> 2, 2 -> 3, 3 -> 1, 4 -> 5, 3 -> 6, 7 -> 8, 8 -> 9, 8 -> 10};
And I make a graph:
...
5
votes
3answers
206 views
How to extract edgeweights from a graph
I have a graph with weighted edges, and I'd like to obtain the edge weights of the edges in the graph. Is there a nicer way of doing this than getting the ...
3
votes
0answers
148 views
Is it possible to manipulate graphs by hand? [duplicate]
Possible Duplicate:
Generating graphs interactively (GUI)
If I plot a graph, is it possible for me to manipulate the vertices such that when I move them, their attached edges will follow.
...
