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)

5
votes
2answers
66 views

Small World network on a square grid

My aim is to generate a 2D Small World network on a square grid. i.e. 20x20. With a probability of 5%, one node rewires from an adjacent node to a random node of the grid, allowing some long distance ...
2
votes
0answers
75 views

How to make a flowchart? [on hold]

I'd like to make a flow chart in similar to this: I think it's more of a layout and stylistic question for a graph - how to style a graph with labeled edges and vertices so that it looks like a ...
1
vote
1answer
30 views

Trying to get simple excel data to be imported as a social network directed graph

My data has two columns that we'll call A and B. The columns proceed as such A B A1 B1 A2 B2 A3 B3 .... I'm trying to make this into a directed graph where A1 has an outgoing edge to B1 and ...
1
vote
2answers
41 views

Random bipartite graphs?

RandomGraph[{n,m}] generates a random graph with $n$ vertices and $m$ edges. I want to generate a random bipartite graph, like ...
4
votes
3answers
151 views

Graph generation from a non-paired edge list

The elements in e = {{6414, 6598, 6927}, {7, 1035, 2382, 6927}, …} are the graph nodes; for example, {6414,6598,6927} is ...
0
votes
2answers
184 views

Using different colors in TreeForm?

I've used TreeForm, and I appreciate that the syntax is fairly short, especially in comparison with TreeGraph. Is it possible ...
7
votes
1answer
110 views

How to extract a Graph[] from an image?

This graph (as a picture) is given below: I am wondering rather than setting up this network graph using Mathematica syntax such as PathGraph,...
1
vote
2answers
143 views

Chromatic number for “great circle” graph

I would like to calculate the chromatic number for a great circle graph. I tried this example in this link. I first tried to calculate the chromatic number for ...
2
votes
2answers
85 views

Is it possible to visually edit a graph?

Given a graph, obtained by something like CompleteGraph[5], can I somehow add/remove edges/vertices visually? Or is the only alternative to transform it via ...
0
votes
1answer
24 views

Deleting vertices from Graph and preserving Structure?

My goal is to remove vertices from graphs (and the edges from them) and then take GraphComplement to find out cut sets in graphs with sink and source such as here. So How can I delete vertices from a ...
2
votes
2answers
89 views

VertexDelete Problem

I am doing a straightforward deletion of a set of vertices in a Tree using Mathematica. ...
4
votes
2answers
86 views
10
votes
1answer
70 views

Arrows from GraphicsComplex not converted to Normal form correctly

Bug introduced in 7.0 or earlier and persisting through 10.3.1 or later Show @ Graph[{1 -> 2, 2 -> 3}, Frame -> True] Normal @ % Is this a pure bug, ...
4
votes
0answers
40 views

What's meaning of `VertexConnectivity`?

Are there a conflict in this two place in documentation? In the Basic Examples: Then the Properties & Relations But actually:
0
votes
0answers
61 views

Plotting a graph on a torus and another surfaces [duplicate]

I'm trying to figure out how to plot a graph on a surface. My goal is to represent a planar embedding of $ K_5$ in a torus. I have encountered this post, where you can find an explanation how to plot ...
14
votes
1answer
271 views

GeoGraphics : path within a country

I am using GeoGraphics to visualize electricity distribution networks in certain countries. I have susbtation location data, as well as network incidence matrices ...
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 ...
4
votes
0answers
73 views

Issues adding properties to multigraph

Unsupported Functionality (loosely, a bug) Mathematica (as of 10.3) does not support multi-graph where edge properties vary between two nodes that share multiple edges. Although this is not ...
2
votes
1answer
58 views

Generate list of traceable and planar graphs

Is there any way to tell Mathematica to generate a list of graphs that are both traceable and planar?
0
votes
1answer
86 views

Import graphml file in mathematica

I am trying import a graphml file I created with NodeXL in mathematica in order to create a network. However when i try to import it I get the error message: "Cannot import data as GraphML format". ...
12
votes
2answers
230 views

Zoom in on a 2D graph

I have seen many queries on zooming in on plots etc. But I haven't seen any regarding 2D graphs. For eg if I have a graph like Graph[{1->2, 2->3, 3->1}]. ...
3
votes
1answer
115 views

Hasse Diagrams from Adjacency Matrix

Let's say I have a rather large adjacency matrix for a partial order relation. Say an 80x80 matrix. What is the best way to display Hasse diagram? I have tried AdjacencyGraph and it does a not so bad ...
14
votes
1answer
481 views

Dual graph of an arbitrary (planar) graph

Every planar graph has a dual. How can I obtain it with Mathematica? I know that GraphData provides the DualGraph property for ...
6
votes
0answers
84 views

Deleting zero edges from a graph causes bizarre behavior

Bug introduced in 10.3.0 and persisting through 10.3.1 or later Consider the following (very simple) graph, with two vertices and one edge: ...
18
votes
1answer
325 views

Reconstruct a graph from an image (curved edges and edge crossings)

Actually, I posted a very similar question before this.How to generate a Graph from a picture of a graph Dr. belisarius's answer have answered that question, but I find a limitation in that method: ...
12
votes
1answer
230 views
1
vote
0answers
49 views

Is there a way to update a graph in place?

I'm assembling graphs programmatically, and looping through EdgeAdd[] a lot. graph = EdgeAdd[graph, a -> b]; Is there a more efficient way to do the updates ...
11
votes
1answer
111 views

Question about TransitiveReductionGraph

Bug introduced in 10.0 and persisting through 10.3.1 Note: TransitiveReductionGraph is new in 10.0. In Mathematica 10.0 and 10.1, according to the documentation ...
9
votes
0answers
82 views

Set new edge capacity

Bug introduced in 9.0 or earlier and persisting through 10.3.1 I am trying to add a new edge to an existing graph and set its capacity, but for some reason the ...
11
votes
2answers
117 views

EdgeAdd function not adding edges to a RandomGraph[ ]

Bug introduced in 9.0 or earlier and persisting through 10.3.1 I have a graph: g = RandomGraph[{1, 0}] So basically, it is just one vertex. I want to add some ...
2
votes
2answers
66 views

DiscreteMarkovProcess: labelling of states

Related, but it seems like the respondents there misunderstood the question. The following errors as DiscreteMarkovProcess::invsm: ...
1
vote
1answer
44 views
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 ...
0
votes
0answers
68 views
3
votes
1answer
97 views

What exactly does LocalClusteringCoefficient compute for directed graphs?

For undirected graphs, the LocalClusteringCoefficient of vertex v is ...
6
votes
2answers
61 views

How to specify custom graph styles for `GraphStyle`?

There is a way to specify custom themes for plots (Is it possible to define a new PlotTheme?), but themes to not apply to Graph objects, not even to ...
1
vote
3answers
50 views

How to draw graph with named vertices by adjacency matrix?

I have the adjacency matrix of graph and I want visualize this graph. I tried: ...
10
votes
1answer
388 views

Shortest tour with vertex priority

I changed the title of my question and tried to simplify formulation of the problem. I solve a very big vehicle routing problem. I divided this one big problem on many small sub-problems. Each small ...
1
vote
1answer
93 views

Visualizing Matrix that represents a network

I have a nxn matrix $A$ that represents a network. I have $n$ nodes in the network, and the matrix $A$ represents the number of connection (edges) between the different nodes. For example, if $A$=0, ...
6
votes
1answer
107 views

Networkgraph, Thickness of edges based on calculated values

On this blogsite I've read a interesting blog about visualising a correlation matrix. So I started with a simple file like: ...
25
votes
2answers
2k views

Trying to Visualize a Collatz - The Collatz conjecture

I happen to have this collatz collatz[x_, y_] := If[x == 3*y || x == 2*y + 1 || y == 3*x || y == 2*x + 2, 2, 0] So i want a visual 3D adjacency graph of my ...
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. ...
6
votes
1answer
119 views

Alignment of `TreePlot`

I want to construct a binomial tree using TreePlot but have troubles with the alignment. The code ...
1
vote
1answer
41 views

Medium-sized graph won't build

Why can't Mathematica import a 40-KB file (mediumEWD.txt) and build the underlying graph in some decent time? I waited a minute, nothing. ...
13
votes
3answers
536 views

Binary decision diagrams (BDD)

I would like to use Mathematica to help me simplify a given Binary Decision Diagram (i.e. pick the optimal variable ordering). I don't seem to find anything at all on the topic, although it is ...
2
votes
1answer
50 views

Highlighting a graph with non-trivial vertex definitions

When defining a graph whose vertices are sets e.g. the Kneser graph, how does Mathematica interpret the vertices? I am having trouble highlighting vertices when I define vertices with sets, but for ...
1
vote
1answer
46 views

Vertices overlap with vertex labels

How to prevent a behavior on a picture below? Why vertices overlap with vertex labels? ...
0
votes
1answer
39 views

How to change vertex font size in TreeGraph?

I tried to change vertex label font size by the following code ...