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)

6
votes
1answer
74 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 (Original post: ...
25
votes
4answers
2k 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 ...
0
votes
0answers
33 views

Plot function producing no graph [on hold]

I am trying to plot this probability distribution but nothing is showing up on the axis: ...
3
votes
1answer
245 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, ...
0
votes
0answers
45 views

What's wrong in my code for looping? [on hold]

Here is my code to draw a graph then harmoniously coloring graph: ...
1
vote
1answer
150 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
97 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
46 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
66 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
62 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
62 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
25 views

How to define a function with more than one equation in? [closed]

How do I define the first function where there are more than one equations in it with each with an inequality? And for the second question how do I graph the periodic extension, what is it?
2
votes
0answers
53 views

Choosing a List as VertexWeight for a TreeGraph

I would like to map every vertex of my TreeGraph to an List. ...
0
votes
0answers
37 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 ...
-1
votes
0answers
41 views

Calculating genus of graph

How to calculate genus of graph in Mathematica 10? I could not find a built-in function to calculate this value.
3
votes
1answer
123 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
33 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
274 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
47 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
46 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
342 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
412 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
21 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
30 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
49 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
33 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
50 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 ...
2
votes
1answer
102 views

Dynamic process on graph

I have a question, which I failed to find an answer to myself. I'm a casual user of Mathematica, but do have some knowledge about Dynamic module and other "Advanced" features. My problem is ...
9
votes
1answer
878 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
169 views

Graph smoothing keeping vertices fixed?

Context Given a Graph like this one: ...
0
votes
0answers
27 views

How to control which nodes get placed at each radius with GraphLayout → “RadialEmbedding”?

I have a directed graph each of whose nodes belongs to exactly one of three groups: "sources", "sinks", and "both". As these names suggest, nodes in the "sources" group have only outgoing edges; ...
1
vote
0answers
101 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
141 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
62 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
204 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
161 views

Vertex merging in graph?

Given a Graph such as the one produced with the following code ...
9
votes
4answers
281 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
24 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
61 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
53 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
623 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
55 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
700 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 ...
5
votes
2answers
217 views

Is there something wrong with VertexConnectivity

As I noticed in the documentation VertexConnectivity is defined as the following The vertex connectivity of a graph $g$ is the smallest number of vertices whose ...
9
votes
2answers
958 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, ...
17
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
45 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
324 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
72 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 ...