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)

1
vote
0answers
30 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: ...
0
votes
0answers
44 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 ...
1
vote
1answer
60 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. ...
3
votes
0answers
39 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: ...
4
votes
0answers
33 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 ...
6
votes
1answer
106 views

Vertex displacement/merging in graph?

Given a Graph such as the one produced with the following code ...
-5
votes
0answers
51 views

Solve Linear Programm [closed]

I got the following LP problem and have to solve it. Obviously, the y in the objective function needs to be replaced by constraint 2. These are the current values for H,L,f. Any ideas, how I can ...
0
votes
1answer
38 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 ...
4
votes
2answers
67 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 ...
13
votes
2answers
287 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 ...
1
vote
1answer
41 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 ...
0
votes
2answers
68 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: ...
0
votes
1answer
34 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 ...
6
votes
1answer
270 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. ...
1
vote
1answer
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 ...
4
votes
1answer
117 views

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

I don't understand why the following does not work: ...
2
votes
1answer
65 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 ...
2
votes
1answer
202 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 ...
0
votes
1answer
49 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 ...
7
votes
5answers
366 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 ...
1
vote
1answer
39 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. ...
1
vote
2answers
53 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 ...
1
vote
1answer
37 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 ...
3
votes
2answers
127 views

Hasse Diagrams in Mathematica using an arbitrary relation

As a kludge to draw Hasse diagrams for an assignment, I wrote(based on this): ...
4
votes
3answers
178 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. ...
0
votes
0answers
69 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, ...
1
vote
1answer
60 views

how to depict a network with a legend

Because my network nodes have real world names more than a few characters long, I'd like to label them with a shortcut, e.g., n1, n2, n3, ..., and put a legend on the side something like this: n1 - ...
1
vote
2answers
90 views

getting vertices in order from spanning tree

I've got spanning tree for some weighted graph (edges labeled 1-6) - for example: ...
1
vote
1answer
113 views

Finding Hamiltonian path in Graph

I have weighted, undirected full graph (generated from points in R^2), where weight between every two vertices are euclidean distance between corresponding pair of points. What I'm trying to do is ...
6
votes
1answer
142 views

Fractal dimension of a large networked molecular system

I am trying to determine the fractal dimension of this complex biomolecule (figure attached). Any clues as to how this can be done. In trying to determine this quantity, I wonder how its ...
1
vote
1answer
95 views

Planar graph layout

Mathematica supplies planar graph layout, which draws a nice picture of a planar graph, but is there any way to get one's hands on the layout? For example, to find its faces (complementary regions)? ...
5
votes
3answers
93 views

GraphIntersection Problem

I Have a problem when plotting 2 functions. I want to find out where the two graphs intersect eachother. That said, I want the coordinates (x, y) of the point. ...
2
votes
1answer
82 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 ...
2
votes
1answer
38 views

Mathematica 8: EdgeList and CommunityStructureAssignment shadowing problem

I'm facing some issues when trying to use the CommunityStructureAssignment function from the GraphUtilities package in Mathematica 8. I'd like to output a ...
5
votes
2answers
149 views

Graph expansion on Mathematica

Is there a way by which Mathematica can be given a graph as an input and be asked to find its expansion? Note: By "expansion" I mean the quantity called "isoperimetric number" or "Cheeger constant", ...
9
votes
4answers
208 views

Multiple Forms of Transportation Between Cities

I want to be able to show different connections between cities based on modes of transportation. For instance, you could walk to any city, but it would take a long time, you could take a train, but ...
12
votes
6answers
385 views

Finding all paths of certain length between vertices in path graph, non-simple ones too

First I will tell you what my ultimate goal is, because maybe there's another way of doing it other than what I am trying. I need a list of all $(a_1, a_2, \ldots, a_N)$ tuples that satisfy certain ...
2
votes
1answer
83 views

Creating an Adjacency Matrix to connect an undirected network

I used the locator pane to map a network, specifically the Maryland Power Grid. What I would like is to have some sort of numbering of the vertices on the unconnected network, how to make an adjacency ...
0
votes
0answers
36 views

Graph embedding and edge weights [duplicate]

Does functions like GraphPlot take in to account edge weights in case of springelectrical embedding? In case of spring electrical embedding I expect the vertices connected by heavy edges to be pulled ...
9
votes
1answer
138 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 ...
5
votes
1answer
67 views

How to use DegreeGraphDistribution with directed graphs?

DegreeGraphDistribution supports directed graphs because it has a DirectedEdges option. How can I specify the in-degree ...
1
vote
0answers
60 views

Request: Create a planar graph using Mathematica (at least v9) [closed]

Can someone please copy/paste the planar Graph given by Mathematica (at least v9) for this graph: ...
4
votes
1answer
129 views

Undocumented overload for Graph?

I stumbled (here, in the expression for the block diagram) upon a version of Graph that I don't see in the documentation over here. That documentation admits three overloads (the following are in my ...
5
votes
0answers
93 views

How to draw block diagrams as Graph objects?

In the documentation ClosedLoopResponsesWithAPIDController, There is a very nice block diagram. I want to create my own block diagrams similar to this. I clicked on the diagram and pressed ...
6
votes
1answer
194 views

Coloring edges of a graph according to their weight?

What's the simplest way to plot a graph with weighted edges, such that the color of the edge corresponds to the weight of the edge?
14
votes
3answers
507 views

How can I construct and visualize a hypergraph?

A hypergraph is a generalization of a graph, in which an edge can connect more than two vertices. Thus you can think of an edge in an hypergraph as a subset of nodes. Since version 8, Mathematica has ...
5
votes
3answers
513 views

Graph and Markov Chain

I have the following code: proc = DiscreteMarkovProcess[1, {{0.6, 0.4}, {0.3, 0.7}}] Graph[{"A", "E"}, proc, GraphStyle -> "DiagramBlue"] How can I 'force' ...
6
votes
1answer
129 views

Replacing graph nodes with matrices

I would like to label a graph with matrices. Suppose the graph is simple: And I have an array mats that contains the labels for vertices 1,2,3,4 (these are just random 0-1 matrices; ignore the ...
0
votes
1answer
84 views

Turning sound into a graph

I'm writing a comprehensive text on graphs and Mathematica and in this context I have this, let's call it, creative gap between sound and graphs. There are plenty of ways one can create graphs from ...
2
votes
1answer
158 views

How to convert a sparsearray to a graph?

s = Import["hello.mat"]; t = GraphEmbedding[Graph[s[[1]]], "GridEmbedding"]; I get the following error: GraphEmbedding::graph: A graph object is expected ...