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)

2
votes
0answers
52 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
37 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
913 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
173 views
1
vote
0answers
106 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
143 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
65 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
205 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
165 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
31 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
76 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
55 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
631 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
61 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
712 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
975 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, ...
19
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
47 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
334 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
73 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
449 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
293 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
57 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
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: ...
2
votes
1answer
58 views

Check Specific Connections within Graph

Say you have the skeleton of a graph: nodeset= PolyhedronData["Icosahedron", "SkeletonRules"] and you've an arbitrary list of some fraction of those nodes, say ...
3
votes
1answer
158 views
0
votes
1answer
43 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 ...
2
votes
1answer
229 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
121 views

Generate Random 3D Network using GraphPlot3D and loop

Instead of writing all this out I want to do the same thing with a loop and be able to manipulate n and k. The idea is to create a randomly generated network where n is the number of nodes and k is ...
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 ...
14
votes
3answers
3k views

How to generate random directed acyclic graphs?

How to programmatically build random directed acyclic graphs (DAG)? I know about the AcyclicGraphQ predicate and the ...
4
votes
1answer
134 views
7
votes
1answer
215 views

Finding Rings In A Network

I am doing a research on networks which consist of polygons with different number of sides. I am trying to find all rings (or cycles) in a network. As an example, consider the following graph: ...
2
votes
1answer
78 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 ...
6
votes
3answers
700 views

Random Geometric Graphs

I'm trying to implement an application which uses random geometric graphs in Mathematica, but it seems Mathematica lacks the functionality. I need the following functionalities: Generate a set of ...
17
votes
3answers
1k views

Creating diagrams for category theory

Lately I've been doing algebra and I have found myself drawing a bunch of diagrams when I attempt to solve a problem. Most of the diagrams are very simple so I thought, I bet I can do this in ...
9
votes
1answer
324 views

Caching of Graph Graphics

In this answer, Simon Woods concludes that when you display an expression with head graph more than once, something is getting stored somewhere. I looked into it too and found out this only happens if ...
7
votes
5answers
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 ...
3
votes
2answers
152 views

Hasse Diagrams in Mathematica using an arbitrary relation

As a kludge to draw Hasse diagrams for an assignment, I wrote(based on this): ...
0
votes
1answer
67 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 ...
1
vote
1answer
45 views
1
vote
2answers
60 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 ...
5
votes
2answers
157 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", ...
23
votes
2answers
3k views

How to play with Facebook data inside Mathematica?

I saw this post from Wolfram here and I would like to know how to import facebook data into Mathematica.
5
votes
3answers
200 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
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, ...
6
votes
1answer
160 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
2answers
103 views

getting vertices in order from spanning tree

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