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
1answer
31 views

Graph labels are outside the plot area and other aesthetic considerations [on hold]

The label of the rightmost element is clipped by the plot edge. ...
1
vote
2answers
46 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
33 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
2answers
95 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
172 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
65 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
59 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
82 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
95 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
132 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
92 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
89 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
74 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
37 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 ...
4
votes
2answers
143 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", ...
8
votes
4answers
204 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
349 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
79 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 ...
-1
votes
0answers
35 views

How can I get GridEmbedding for my graph? [duplicate]

I evaluate the following s = Import["hello.mat"]; t = GraphEmbedding[s[[1]], "GridEmbedding"]; and I get the these error messages GraphPlot::mthd: The value ...
8
votes
1answer
112 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
65 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
126 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
79 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
183 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
489 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
495 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
126 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
82 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
152 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 ...
3
votes
5answers
213 views

Ordering the Boundary points of a Polygon

I feel like this should be simple, but I keep running into walls. Say someone gives you the coordinates of the vertices of a pentagon and the center point of the hexagon. Is there any way to get an ...
3
votes
2answers
238 views

How to create a 'shortest-path link matrix'?

I am currently struggling with a problem in Mathematica. I have a randomly generated weighted Barabasi-Albert graph and a corresponding demand matrix of the same size. I'm generating the graph with ...
3
votes
0answers
82 views

Citation of the algorithms used in FindGraphCommunities [closed]

For my research work I need to put a comparison of different community detection algorithms. Instead of implementing all those algorithms once again, I would like to use the methods already provided ...
4
votes
2answers
202 views

Coordinate extraction and manipulating graphs as graphics objects

Consider the image below: GraphData[{"Wheel", 7}] Is it possible in Mathematica to lay several of these Graph along each ...
1
vote
1answer
47 views

Importing additional custom data in DIMACS format

I have graphs in DIMACS format, with vertex colors specified. The vertex colors are denoted by lines n u c, where u is the ...
8
votes
3answers
414 views

How can one draw a network with nodes and links in a grid shape?

I'd like to be able to use MMa's graphics to make something like this which I know must absolutely be possible (and probably easy) with MMa. I don't actually even need different colors (though ...
1
vote
1answer
46 views

Using FindGraphCommunities, write community membership for each vertex to CSV

I have a network that I've loaded into Mathematica, and I've used FindGraphCommunitites[network,Method->"Hierarchical"] to identify the communities in the ...
1
vote
1answer
86 views
3
votes
1answer
99 views

Expected graph distance in random graph

I am trying to use the functionality of Expectation and Probability for random graphs, in particular for percolation models. ...
2
votes
2answers
124 views

Positioning Vertices in a Graph

I made a graph that has a given number at each vertex: I want to place vertex 1 above vertex 2 if value of vertex 1 is larger than of vertex 2. And also, vertices with same value should be located ...
2
votes
1answer
49 views

Fix the size of vertices and arrow in graphs

I defined an option to draw nicely the graph. But I have a problem with the different size obtained. For example, the layout of the first graph is what I want to have for all other graphs I will ...
3
votes
2answers
80 views

How to get all leaves from a graph's specific node

Let's say I have this graph (The code to generate the graph is at the end) How can I extract all the leaves comming from, let's say "cluster3"?, i.e. {100, 92, 87, 89} I guess I have to first ...
0
votes
0answers
44 views

Graph plotting: specify layers for layered drawing

Mathematica can do layered graph drawing with LayeredGraphPlot or GraphLayout -> "LayeredEmbedding". Is it possible to ...
8
votes
2answers
320 views

Mathematica 10 Graph issue

Please try to evaluate this code in Mathematica 10. ...
3
votes
0answers
127 views

Undirected Network and its Monte Carlo Simulation

So I have this array of points, in the form {x, {y,z}}, where x is the node number assigned when I used the locator pane to make a network, and y and z are its unitary coordinates. The graph is made ...
4
votes
1answer
118 views

Agglomerate output to Graph

I'm using the HierarchicalClustering package to cluster some data. So let's say I have this: ...
3
votes
1answer
120 views

Cellular Automata Neighborhood as Node connections

Can I use the CellularAutomation[] function where the neighborhood is defined by the connections between nodes? For example, if 1 -> 2, 1 -> 3, 1 -> 8, 1 ->1, then the neighborhood of node 1 is the ...
3
votes
0answers
42 views

Does anyone know the options for “HierarchicalEdgeBundling” in Mathematica?

I'm looking to reproduce the types of graph layout that are possible in D3 (http://bl.ocks.org/mbostock/7607999) in Mathematica. Since Mathematica doesn't explicitly support force directed edge ...
2
votes
4answers
109 views

How to plot a graph from it's incidence matrix?

I'm using Mathematica v9 and am trying to draw a graph by using it's incidence graph, but it won't draw it, which occurs an error "is not a valid incidence matrix.". But I've checked my matrix, and ...