# Tagged Questions

Questions about handling graphs in Mathematica, graph theory, graph visualization, GraphPlot, the built-in Graph type and the Combinatorica package.

43 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 ...
91 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 ...
64 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 ...
60 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. ...
23 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?
60 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 ...
40 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.
53 views

### Choosing a List as VertexWeight for a TreeGraph

I would like to map every vertex of my TreeGraph to an List. ...
119 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 ...
36 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 ...
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 ...
126 views

### coloring path harmoniously [solved] [closed]

I delete all my previous question. Here is my result. ...
46 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.
45 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 ...
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 ...
29 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 ...
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 ...
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 ...
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; ...
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 ...
140 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 ...
169 views

### Graph smoothing keeping vertices fixed?

Context Given a Graph like this one: ...
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 ...
61 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: ...
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 ...
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. ...
49 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: ...
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 ...
160 views

### Vertex merging in graph?

Given a Graph such as the one produced with the following code ...
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 ...
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 ...
321 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 ...
50 views

### How to plot graphs with vertices positioned as spread as possible? [closed]

The following code, outputs the graph below: graphList = {{1, 2}, {1, 3}, {1, 4}, {2, 5}, {3, 6}, {4, 7}} Graph[UndirectedEdge @@@ graphList] Is there some way ...
70 views

### Getting FerrersDiagram to work

I am trying to generate FerrersDiagram (see http://reference.wolfram.com/language/Combinatorica/ref/FerrersDiagram.html), any clues to getting it to work? I get error message for the following: ...
40 views

### Create vector for each vertex in a network [closed]

I have a network with x vertices and I would like to create a vector with random numbers for each vertex in this network. I would like to generate this list and represent it in a table. Further, it ...
287 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. ...
43 views

### Unexpected behaviour with GraphIntersection and GraphDifference

I run into some unexpected behaviour of GraphIntersection and GraphDifference. Behaviour is the same for both so the example is only on the GraphIntersection: Suppose I have two lists of directed ...
127 views

### Why can't I export graphs with loops in V10?

I don't understand why the following does not work: ...
69 views

### Vertex Labelling and Word wrap

I am having trouble formatting vertex labels, explicitly adding line breaks to Vertex labels for word wrapping and other purposes. I have explored the pane option suggested here but when I include ...
222 views

### Dynamic graph construction and visualization (Watts' “Small Worlds” α-model)

I need some help in creating a Mathematica program for building and visualizing Watts' "Small Worlds" α-model. This is a variant of the more known (and much more simple) β-model (also known as ...
60 views

### Why Infinity edges with WeightedAdjacencyGraph [closed]

I can't understand why WeightedAdjacencyGraph wants Infinity weight when there are no edges between two nodes. In particular ...
408 views

### Is there a neat way to generate the odd set constraints matrix?

Given a undirected graph $G=(V,E)$, I am trying to generate a related matrix $M$, where columns are indexed by $E(G)$ and rows are indexed by all odd subsets of $V(G)$. I can finish this task using ...
42 views

### Graph labels are outside the plot area and other aesthetic considerations [closed]

The label of the rightmost element is clipped by the plot edge. ...
58 views

### Add weighted edge to a graph in Mathematica 8

Is it possible to add an edge with a specific weight to a Mathematica Graph object? The function EdgeAdd has no option for the weights, nor the ...
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 ...
138 views

### Hasse Diagrams in Mathematica using an arbitrary relation

As a kludge to draw Hasse diagrams for an assignment, I wrote(based on this): ...
189 views

### Enumerating all connected graphs with 9 vertices

The version of my Mathematica is 10. I generate a connected graph with 9 vertices, but find that it is not included in Mathematica. ...
73 views

### Mathematically Eliminated in Baseball

Earlier today the Yankees were mathematically eliminated from the playoffs. Determining when this condition is satisfied for any given team is complicated but can be solved as a maximum flow problem, ...