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)

3
votes
1answer
227 views
+50

The unexpected behavior of FindMinimumCostFlow?

I need to verifiy which behavior is a bug or I misunderstand the documentation.So I give a bounty for it. I'm at a loss to understand the behavior of the ...
0
votes
1answer
35 views

converting a named graph into a graph object

I am seeking the edge lists of the complements of named graphs on n vertices. At first sight I would use ...
3
votes
3answers
224 views

How to compute the automorphisms of graphs with multiple edges?

I try to compute the Automorphisms of graphs with multiple edges from its AdjacencyMatrix but failed. The following code shows ...
0
votes
0answers
19 views

How to fix <<MathWorld`Graphs` package cannot be opened? [duplicate]

From http://mathworld.wolfram.com/PaleyGraph.html I downloaded this notebook http://mathworld.wolfram.com/notebooks/GraphTheory/PaleyGraph.nb. The notebook contains the line ...
10
votes
1answer
370 views

Is there a function to generate a minimal clique cover?

This is a graph problem known as the "Clique Edge Cover" or "Intersection Number" problem, and the goal is to find, from a given graph like $E=\{\{a,b\},\{a,c\},\{b,c\},\{b,d\},\{c,d\}\}$ and $V=\...
5
votes
1answer
63 views

How can I generate a graph from a NetworkX JSON

I have done some network generation and analysis in Python NetworkX. I do most of my visualizations with D3, but for publications I would like to generate some graph plots with Mathematica as well as ...
4
votes
2answers
162 views

How to get the Perfect Matching or Near-Perfect Matching

I have found the Perfect Matching's definition in Wiki. A perfect matching (a.k.a. 1-factor) is a matching which matches all vertices of the graph. That is, every vertex of the graph is incident ...
11
votes
1answer
161 views

Left Right Straight Maze

How do I generate a Left, Right and Straight ordering for a maze for something like the following? Similar to generating a left and right ordering for someone walking in real life. ...
3
votes
1answer
50 views

Which are the standard graph properties?

Graph objects can have different kinds of "properties": vertex properties edge properties graph properties Each of these can be standard ones, such as ...
5
votes
0answers
99 views

FindMaximumFlow generates a weird result

Bug introduced in 10.0 and persisting through 10.4.1 Try the following program: ...
3
votes
2answers
200 views

How to make a disconnected graph to be 1-edge-connected(but not 2-edge-connected) with some shortest edge

Assume I have a graph.You can run following code to get it. Import["http://goo.gl/NaH6rM"]["http://i.stack.imgur.com/EyAKW.png"] It is a disconnected graph.But ...
1
vote
1answer
122 views

How to connect some separate components with shortest total length line

Maybe this post too hard.So I try to make a simple version to research. Simulating a simple graph than that post. ...
2
votes
1answer
54 views

Network Analysis Problems with SystemModeler

Is it possible to analyse network problems like shortest path, minimum spanning tree, maximum flow, travelling salesman etc. with SystemModeler? If so where cm I find tutorials and examples?
1
vote
0answers
34 views

Where can I find documentation on the methods/algorithm used in FindGraphPartition in Mathematica 10?

I am working on a graph theoretical project where it would be helpful to know the name of the algorithm used in FindGraphPartition. Question: Where can I find ...
0
votes
1answer
51 views

Specifying number of clusters and members in CommunityGraphPlot

The Issue I am trying to specify the number of clusters and the number of members in each cluster that the CommunityGraphPlot function forms as part of a larger project. The Code This code ...
9
votes
1answer
147 views

Clickable graph

Can someone help me to make a clickable graph? Graph[{1 -> 3, 2 -> 3, 3 -> 6, 4 -> 6, 1 -> 5, 5 -> 4, 6 -> 2}] I found that ...
1
vote
2answers
191 views

How can I re-create the original Graph object from Graphics object into which that Graph was converted previously?

We can convert a Graph into Graphics very easily like it is shown in this answer. My question is: how to convert a ...
0
votes
0answers
17 views

Mathematica function for vehicle routing and CPM/PERT problems

Is there any built-in Mathematica function to solve general vehicle routing and CPM/PERT problems?
0
votes
1answer
49 views

“Graphics is not a Graphics primitive or directive.” when returning an `Import`ed image for `VertexShapeFunction`

I am trying to use Graph (not GraphPlot) and replace some of the vertices with an image, like so: ...
8
votes
3answers
115 views

Tree graph showing all simple paths with dead ends between two vertices in undirected graph

I have undirected weighted labeled graph. How i can generate and visualize tree graph, showing me all simple paths (and dead ends) from vertice A to vertice B? For example, for this graph to show ...
2
votes
0answers
59 views
2
votes
0answers
112 views

Incompability between v5-6 and v10 with Graphs and Oriented Graphs pkgs?

Notice that "although the v6 Packages are available at the link in the answer above they are not fully compatible with v10". The errors 1, 2 and 3 in Mathematica 10 student edition may be due to ...
11
votes
2answers
123 views

Why are some of the isomorphisms not bijective?

Bug introduced in 10.4 Mathematica computes all the isomorphisms between graph g1 and g2: ...
1
vote
1answer
82 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
1answer
51 views

None connected graphs for n=59? [closed]

For some reason GraphData["Connected", 59] gives no graphs, is this a bug?
5
votes
4answers
160 views
3
votes
1answer
54 views

Plotting the complement of a graph without changing the name of the vertices

I have a graph in the form {Dog -> Apple, Apple -> Screwdriver}, I used to plot a graph in the following way: ...
3
votes
2answers
127 views

Visibility Graph of Polygon

Could anyone provide a function that takes a polygon as input and outputs its visibility graph ? Visibility Graph If not, is there a function that checks whether a line segment lies inside a polygon?
1
vote
2answers
51 views

Plotting points using adjacency matrix

Given an adjacency matrix on n vertices and a polygon on n vertices, how to add edges from adjacency matrix on the Polygon? eg: if polygon is {(0,0),(0,1),(1,0),(1,1)} and the adjacency matrix has 1 ...
2
votes
0answers
48 views

How to understand the LocalClusteringCoefficient use in directed graph? [duplicate]

When this function use in undirected graphs,its action is normally and can be explained by this formula $$CC_v=\frac{n}{C_{k}^{2}}=\frac{2n}{k(k-1)}$$ n is adjacent nodes of $v$'s number of ...
2
votes
2answers
452 views

Convert DelaunayTriangulation-> Graph->AdjacencyMatrix

Is there a way to convert a Delaunay Triangulation into a Graph structure so that one can generate an AdjacenyMatrix of the Delaunay?
3
votes
0answers
79 views

A unexpected behaviour of RelationGraph

$Version "10.4.1 for Microsoft Windows (64-bit) (April 11, 2016)" I want to match the based point of VoronoiMesh(...
18
votes
2answers
1k 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 ...
0
votes
2answers
31 views

Finding vertices with a given degree; or, finding indices

I have a graph g and would like to find all the vertices in g with degree n. ...
1
vote
1answer
64 views

Permutations on graph vertex labels

I want to generate all the possible adjacency matrices of equivalent unlabeled graphs. For example, consider the simple path graph of three vertices. There are three possible adjacency matrices: <...
0
votes
0answers
23 views

The command SocialMediaData still returns a blank plot [duplicate]

I have Mathematica 10.3.1 in Mac OS, and the command SocialMetaData is not working, returning a blank plot. I have seen a similar question from Nov 28 '15, but it is still not solved. ...
6
votes
0answers
103 views

Issues adding properties to multigraph

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

Objects - fixed properties [closed]

How do I set properties of graphs permanently? Is there any way? For example VertexLabels -> "Name". I would like to see labels, always when I open a new ...
4
votes
1answer
53 views

Generate graphs from the output of GraphAutomorphismGroup

Given g = Graph[{1 -> 2, 2 -> 3, 3 -> 1, 4 -> 1, 1 -> 5, 5 -> 4}, VertexLabels -> "Name"] GraphAutomorphismGroup[g] outputs ...
3
votes
1answer
85 views

Replicate CommunityGraphPlot as a Graph

Is it possible to format a Graph object in a similar way to CommunityGraphPlot, but retain it as a Graph? I've been playing with FindGraphCommunities but I'm obviously missing some of the pre-...
5
votes
1answer
84 views

Is it possible to use a function for EdgeWeight in a Graph?

Why I cannot calculate all edge weights beforehand: I have many large graphs for which I'd like to find the shortest path between two vertices (FindShortestPath ...
0
votes
1answer
32 views

Incidence matrix not reproducing the graph

I am trying to reproduce the graph from an incidence matrix. For eg i have ...
9
votes
2answers
155 views

HighlightGraph Problem

Bug introduced in 9.0 or earlier and persisting through 10.4.1 HighlightGraph does not work. ...
6
votes
0answers
35 views

Minimal Spanning Tree with EdgeWeights

Given a graph with EdgeWeights, I'm finding the minimal spanning tree: ...
4
votes
1answer
130 views

Styling a FlowGraph

I tried to re-style a flow graph found via FindMaximumFlow, but this seems not to work: ...
1
vote
1answer
73 views

Vertex sizes scaled by vertex degree?

Is there any way of scaling the sizes of the vertices of a network proportional to the vertex-degrees of the vertices in Mathematica? Thanks.
5
votes
1answer
209 views

How to find giant component of a network?

Is there a specific command in Mathematica 9 or 10 to extract the largest component of a given network which has one large and many small components? The ...
11
votes
2answers
202 views

Is it possible to get the (x, y) position of nodes in a `Graph`?

Given a graph... RandomGraph[{20,40}] ...is it possible to retrieve the (x, y) coordinates at which the nodes are drawn? ...