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)

18
votes
1answer
296 views

Visual representation of a Ranking over time (image provided)

[Disclaimer: I initially posted this question on stackOverflow 2 months ago and think it might be better suited for this forum (link to original question)] The graph below shows a ranking of ...
3
votes
1answer
65 views

Minimal Colouring of Graph Vertices

Is there a way to colour graph vertices minimally in new Mathematica? I tried loading MinimalVertexColoring with the old Combinatorica package but it doesn't work ...
3
votes
1answer
96 views
3
votes
1answer
68 views

FindShortestPath with VertexWeight

I have a weighted graph on which I want to perform some FindShortestPath calculations. However, the problem is that my weights are defined for vertices with ...
5
votes
0answers
37 views

What system functions use VertexWeights?

EdgeWeights -> are used by a lot of functions, but I can't find any exposed usage for VertexWeights ->. I'm not asking ...
0
votes
0answers
60 views

What graph distributions are available in Mathematica?

Where can I find a list of all the graph distributions available in Mathematica?
25
votes
4answers
3k views

How to generate a random tree?

Is it possible to generate a random tree without explicitly constructing a random adjacency matrix that satisfies tree properties? How about a random directed tree? Edit: incredible answer by ...
3
votes
1answer
270 views

Map of all graphs obtainable with GraphData?

I've been trying to put together an answer to another question, but I am stuck, so I decided to post this question instead. Mathematica contains (among its curated data) information on definition, ...
1
vote
1answer
156 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 ...
5
votes
2answers
115 views

Visualizing subgraphs while specifying the locations of vertexes

I would like to visualize separate connected components of a graph defined by data points lying in the two-dimensional plane by surrounding each connected component subgraph by a bounding curve. I ...
3
votes
1answer
54 views

Edge Labels with distance between vertices

I am trying to make traveling salesman type graph using the locations of NFL stadiums as the vertices. I need to get the EdgeLabels to appear was the distance between the vertices. I was able to ...
3
votes
1answer
74 views

System of differential equations on a directed graph

I want to use Mathematica to model blood flow through a capillary network. The approach we are using is going to be to create a directed graph, and have a system of differential equations at each ...
1
vote
2answers
69 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. ...
2
votes
1answer
81 views

Community detection on weighted graphs?

The documentation says that FindGraphCommunities works with weighted graphs. I've been playing around with a complete graph with weighted edges, and FindGraphCommunities always returns a single ...
2
votes
0answers
57 views
0
votes
0answers
43 views

Transform NMinimze into LinearProgramming formulation

I have the following maximization problem that I currently try to solve with Minimize/NMinimize. Unfortunately, this kind of solution method takes really long for large systems of equations and ...
3
votes
1answer
131 views

Visually Separating Cliques in Graphs

I have a graph with 189 vertices, more than 10,000 edges and 20 cliques. As one can imagine, this graph is a mess when trying to display it. I'd really like to display the graph, separated into ...
47
votes
2answers
9k views

How can I use Mathematica's graph functions to cheat at Boggle?

Boggle is a word game played with 16 dice and a 4x4 tray. This question is inspired by a Stack Overflow question about Boggle that I decided to solve using Mathematica. In addition to Mathematica, I ...
0
votes
0answers
41 views

Computing Domination Numbers of Graphs

Is there a way to get Mathematica to compute the domination number (size of the smallest dominating set) of a graph? There doesn't seem to be a direct command for this, so I'm not sure if there would ...
4
votes
1answer
289 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 ...
1
vote
1answer
56 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.
2
votes
0answers
55 views

Belief Network, Bayesian network

There is already a question about simulating Bayesian networks with Mathematica (Mathematica Package for Bayesian Networks). However, are there any packages or approaches which help in computing the ...
2
votes
4answers
381 views

How to find a path that traverses each edge of a graph exactly twice?

I have a question regarding a graph traversal problem. This is the graph I am working with: ...
6
votes
3answers
437 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 ...
0
votes
0answers
26 views

“Partial” graph layout (with a fixed core)?

Is there a way to apply a graph lay out algorithm to a Graph object in such a way that a subset of its vertices and a subset of its edges are fixed beforehand, and ...
1
vote
0answers
41 views

Finding optimal inclusion cutoff to define subgraph of a “large” weighted graph

I have a weighted graph G with ~2.5K vertices and ~250K edges. (The edge weights are all in (0, 1), and the weight of each vertex is derived as the maximum of the ...
2
votes
0answers
53 views

Finding quasi-cliques

Is it possible to find quasi-cliques in a graph in Mathematica 10? I don't think it has been implemented, so are there any solutions to do this? Or do I have to export the graph data somehow and do ...
1
vote
1answer
41 views

How to invoke default VertexShapeFunction and EdgeShapeFunction from custom ones?

For this question, g is a Graph object (of order ~2K) such that the VertexWeight and ...
1
vote
1answer
52 views

Graph objects for LineGraph

When I enter for example G = Part[GraphData[10],1]; LG = LineGraph[G]; I get error message that LineGraph requires a graph ...
9
votes
1answer
939 views

Drawing a graph with specified edge lengths

I was wondering if it was possible to ask Mathematica to draw a graph provided some set of vertices: $(v_1, ..., v_N) \in V$ connected by $M$ edges $(e_1, ..., e_M) \in E$, where the length of each ...
11
votes
2answers
189 views
1
vote
0answers
112 views

Replace part in a matrix that matches specific pattern

I have the following problem. Given a matrix L which looks as follows, Matrix L is a link, route matrix. Further, I got the following vector (d), which indicates the demand per vertex combination. ...
2
votes
2answers
147 views

Speeding up the generation of all k-edge-coloring of a graph

A $k$-edge-coloring of a graph $G=(V,E)$ is a function from $E$ to $\{1,\ldots,k\}$, so in other words every edge of $G$ receives one of the $k$ colors available. (In particular, note that we are not ...
1
vote
0answers
67 views

Spread multiple edges by a specified scaled distance (Mathematica 10)

Is there way to spread multiple edges by a specified scaled distance for Graph function in Mathematica 10, something similar to MultiedgeStyle in GraphPlot for example, I would like to write: ...
5
votes
2answers
213 views

How can I preserve the properties of edges of the original graph $g$ in a subgraph that doesn't include every edge of $g$?

The closest question to the following I could find was Preserving labels when using graph functions, but it doesn't seem to cover this. Consider a graph g where ...
8
votes
1answer
173 views

Vertex merging in graph?

Given a Graph such as the one produced with the following code ...
9
votes
4answers
286 views

How can I efficiently check if a graph is unit distance?

A unit distance graph is a graph that is embeddable in the plane so that every edge has length 1. ...
0
votes
0answers
35 views

NMinimize outside the feasible region

I got the following minimization problem. I get a solution if I set constraints1 := L.x >= y; and eliminate constraint 2 from my set of constraints. So ...
1
vote
0answers
79 views

Using NMinimize to solve the Multi Commodity Flow problem

I have the following optimization problem and I was hoping to solve it with NMinimize. Unfortunately, I don't get the desired result. I would like to get an optimal vector for $d_{e}$. This is how ...
4
votes
0answers
57 views

Finding the minimum vertex cut of a graph

It seems that Mathematica is not correctly finding the smallest set of vertices that will disconnect a graph. Here is an example: ...
14
votes
2answers
639 views

Animating transition between all graph representations obtained from curated data

Pappus graph is one of many graphs whose various data is contained within Mathematica. Mathematica typically keeps several ways of representing such graphs: ...
5
votes
0answers
65 views

Graph: PropertyValue changes and Dynamic

I almost never work with Graph in Mathematica but lately I helped someone with it. For this, I tried to make an animation using ...
16
votes
1answer
729 views

How can I conveniently call igraph through RLink?

Mathematica has lots of functions for working with graphs, but this functionality is not yet as mature as the igraph library. It is useful to have access to igraph from Mathematica, both for ...
9
votes
2answers
1k views

Mathematica Package for Bayesian Networks

Are there any packages that allow the simulation of Bayesian Networks with Mathematica? I found what seemed to be a promising package (Dynamics) on a Brown University URL, ...
20
votes
2answers
1k views

Drawing pairs (planar graph, circle packing)

Circle packing theorem states: For every connected simple planar graph G there is a circle packing in the plane whose intersection graph is (isomorphic to) G. How to use Mathematica to draw examples ...
0
votes
1answer
49 views

Verticepair - route matrix

I have the following problem. I have two lists: list1 defines all possible commodities in a network g. E.g. Form vertex 1 to ...
13
votes
2answers
348 views

How to build a 3D graph from a 3D matrix?

Following this and that question and the corresponding answers, Mathematica can build 2D graph from 2D matrices. Question How to make the corresponding 3D graphs from 3D cubes? Attempt ...
4
votes
2answers
78 views

Equivalent of RadialOutside for Graph VertexLabels

I'm creating a circular graph and want the labels to be placed on the outside of the vertices in a circular manner on the outside of the graph. I've been playing around with the ...
15
votes
6answers
453 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 ...
6
votes
1answer
300 views

Connect neighbouring points as list of segments in 2 D

Context I am interested in connecting neighboring points in 2/3D as list of segments. I am guessing this is something within the reach of graph theory, which is well implemented in mathematica. ...