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 ...
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 ...
8
votes
3answers
197 views

Pairwise distances of points and classification using GraphDistanceMatrix

The challenge Given $n$ points in $\mathbf{R}^3$ and a cutoff distance, $d$, I would like to determine all pairs of points that are separated by less than the given cutoff distance, $d$, and all ...
6
votes
1answer
223 views

How to visualize the structure of this dynamic programming code

I am studying Mr. Wizard's answer to this question which tries to identify elementary circles in a graph. That answer uses dynamic programming technique to simplify the code. The underlying guideline ...
9
votes
1answer
118 views

How to get control over DepthFirstScan?

Is there a way to conditionally take control the flow during a depth-first scan against a TreeGraph? I have a tree graph whose nodes are constructed as object, and there's a method ...
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 ...
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?
8
votes
2answers
882 views

Dynamic graph visualisation using JLink/Java and GraphStream

Visualising the addition of new nodes and edges to a graph to 'watch it grow' is to something Mathematica is not suited to by default. However this type of animation really helps convey the emergence ...
3
votes
1answer
372 views

Control over depth-first scan and breadth-first scan

Is there a way to conditionally take control/modify the flow during a depth-first scan or the breadth-first scan ? Say, for example, if a particular node if found, consider it as a leaf-node and ...
10
votes
1answer
141 views

Figuring out how AbsoluteOptions works with Graphs

I am puzzled by how AbsoluteOptions works with Graph objects. I would have expected that one could use it to obtain all the ...
21
votes
3answers
710 views

Finding a “not-shortest” path between two vertices

In designing a routine for making a simple three dimensional (5x5x5) labyrinth, I realized that my solutions (a solution is a labyrinth includes a single path from {1, 1, 1} to {5, 5, 5} in a 5 x5x5 ...
8
votes
2answers
216 views

Cases[data,Colon[key,_]] vs. Cases[data,key:_] toward XPath, XQuery

Exploring methods to index and search tree-structured key:value pairs via named-entity index (key paths) as opposed to Position-based indexing. Using Rule as ...
12
votes
2answers
254 views

Listing subgraphs of G isomorphic to SubG

If I have an undirected graph G, how could I write a function in Mathematica to obtain a list of subgraphs of G that are isomorphic to some other undirected graph SubG? I'd like to learn how to ...
20
votes
2answers
1k views

Cycles of length N in a graph

If I have an undirected graph represented with an adjacency matrix, how can I find all the subgraphs which are a cycle of length N? I don't really know the math nor the programming language well, so ...