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)

3
votes
1answer
124 views

Writing results directly to file

I am trying to find all simple paths in a large directed graph (542 vertex, density ~ 5%) between two nodes. For this purpose, I use the algorithm from this thread. Unfortunately, my computer is ...
7
votes
0answers
280 views

Generating all spanning trees in an undirected graph

I was wondering if there is explicit source code for generating all spanning trees on undirected graphs. I don’t need anything very fancy – perhaps Minty's algorithm or Gabow & Myers. I've only ...
7
votes
0answers
249 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 ...
6
votes
0answers
68 views

HighlightGraph and Hyperlink

In the documentation of Mathematica it is mentioned that you can use Hyperlink and Tooltip as wrapper in a similar manner as ...
6
votes
0answers
105 views

Is there a function to generate a minimal clique cover?

This is a graph problem known as the "Clique Edge Cover" or "Intersection Number" problem, and the goal is to find, from a given graph like $E=\{\{a,b\},\{a,c\},\{b,c\},\{b,d\},\{c,d\}\}$ and ...
5
votes
0answers
225 views

How to compute the genus of a Graph?

What's the simplest way to compute the genus of a graph using Mathematica? I have looked for a Genus function (even in the ...
4
votes
0answers
100 views

Efficient Generation of Subgraphs (or, unfriend a friend a day)

NB: If you're not interested in the back-story, you could simply jump forward to the code which I'm seeking to optimize. Also, I believe this code would only work for MMA 8.0 and above. My friends ...
4
votes
0answers
206 views

Counting paths of a certain length between a source and sink vertex

I have a graph $G$, which may be directed or not, and I was wondering if there was an efficient way of using, say, BreadthFirstScan[] and FindShortestPath[] to count the number of paths between some ...
4
votes
0answers
320 views

Finding a Graph Shortest Path with Custom Graph Distance Function

What is the best way to find a shortest path by using a custom distance function? I'm trying to play a little bit with the concept of using distributions instead of a deterministic weight value for ...
3
votes
0answers
132 views

A* algorithm for finding shortest path in a graph

FindShortestPath finds the shortest path between two vertices in an edge-weighted graph, allowing a choice between the Dijkstra and Bellman-Ford algorithms. In my (limited) understanding, both of ...
3
votes
0answers
208 views

How to compute the Lovász number for the given graph in Mathematica?

Here is a graph whose adjacency matrix is ...
2
votes
0answers
48 views

Can BreadthFirstScan be modified?

I would like to obtain a "slick" implementation of A*-search algorithm on Graph objects, using the built-in BreadthFirstScan (if that is possible at all). I noticed that BreadthFirstScan is static in ...
2
votes
0answers
74 views

Finding rings in a network

I am doing a research on networks which consist of polygons with different number of sides. Is there a way to find rings by BreadthFirstScan function. For ...
2
votes
0answers
75 views

Using Graph to cull correlated lists

I have a set of lists that represent molecular descriptors. I need to identify which descriptors are highly correlated and eliminate the correlated pairs. I can represent the connectivity by ...
2
votes
0answers
269 views

Why my Mathematica 9.0.1 wont work with some samples of Mathematica in Graph Theory?

I updated my Mathematica recently to 9.0.1 cause the previous version was giving me freaky result especially in FindMinimumCostFlow and ...
2
votes
0answers
121 views

Fast calculation of commute distances on large graphs (i.e. fast computation of the pseudo-inverse of a large Laplacian / Kirchhoff matrix)

I have a large, locally connected and undirected graph $G$ with $\approx 10^4$ vertices and $\approx 10^5$ to $\approx 10^6$ edges. Moreover I can bound the maximum vertex degree as $Q_{max}$. I ...
2
votes
0answers
101 views

Strange double evaluation using MorphologicalGraph

(MMA 9.0.0 on Mac OS/X 10.8) Please consider the following snippet (this is as SMALL as I could make it -- my attempts at making a smaller repro-case eliminated the effect that I am investigating) ...
2
votes
0answers
184 views

How can I compute the chromatic index and number of a graph?

I saw a recent question from M.R. and realized there is no function to compute the chromatic index and number of a graph, other than a really slow method in the now deprecated Combinatorica. So, how ...
2
votes
0answers
188 views

How to predict some constant number of values with NeuralNetworks

Example: << NeuralNetworks` data = {Sin[#]} & /@ Range[0, 4 Pi, 0.5]; learn = data[[1 ;; 15]]; Now, lets fit our neural network: ...
1
vote
0answers
35 views

Why does Network`GraphPlot`wrapper appear in my GraphPlot?

I'm making a GraphPlot of data similar to this: ...
1
vote
0answers
93 views

How to make Layer Directed Graphs (LDG) in mathematica?

I am wondering if I can make a graph like that somehow: I am new to mathematica, I tried to play with Creating a graph with variable size of vertices and variable thickness of edges . I figured if I ...
1
vote
0answers
100 views

Network problem of visualization of vertex

I have a question about visualization of network in Mathematica: for example: for this network g = ExampleData[{"NetworkGraph", "Friendship"}]; when we ...
1
vote
0answers
144 views

Get path to end nodes in directed (partially cyclic) graph

I have a large directed graph containing small loops. I would like to extract all paths to all end nodes (no VertexOutComponent) with a given path length $n$. I ...
1
vote
0answers
74 views

What algorithm is Mathematica using for FirstPassageTimeDistribution[]?

What algorithm is Mathematica 9 using for FirstPassageTimeDistribution[]? Is it attempting to use PseudoInverse[] on the ...
0
votes
0answers
37 views

Get correlation matrix when using FindGraphCommunities

Does somebody know how to get the correlation matrix when using FindGraphCommunities (Social Network analysis) using the "Spectra" option? Can somebody tell me as ...
0
votes
0answers
45 views

Show dynamic graph and plot together

I have a following code (sorry for the czech comments, if you wish, I can edit them to english) - it's an exercise for a monte carlo method lesson: ...
0
votes
0answers
90 views

How to extract connected bipartite graph from incidence matrix

I'm trying to extract a connected bipartite graph Bconn from the a given incidence matrix B- I have a matrix representing a bipartite graph - the incidence matrix B (weighted or not is unimportant). ...
0
votes
0answers
54 views

GraphHighlightStyle with multiple datasets

I am trying to highlight several subgraphs of a graph using the following command: ...
0
votes
0answers
91 views

Tools for finding minimal or almost-minimal graph vertex colorations in Mathematica v9?

I'm looking to compute minimum vertex colorations (s.t. no two vertices of the same color share an edge: http://en.wikipedia.org/wiki/Graph_coloring) for graphs in Mathematica v9 with potentially up ...
0
votes
0answers
87 views

Any useful operations on LinkedIn data?

I have connected to LinkedIn using SocialMediaData, but the information seems to be limited to my connections and their IDs. How is this interesting? Is there a way to load a network using the ...
0
votes
0answers
102 views

Pearl's Message Passing Algorithm

Has anyone tried to implement the Message Passing algorithm using Mathematica's Graph/Combinatorica features?