graph-theory

Efficient way to recursively calculate dominator tree?

筅森魡賤 提交于 2019-12-03 01:52:38
I'm using the Lengauer and Tarjan algorithm with path compression to calculate the dominator tree for a graph where there are millions of nodes. The algorithm is quite complex and I have to admit I haven't taken the time to fully understand it, I'm just using it. Now I have a need to calculate the dominator trees of the direct children of the root node and possibly recurse down the graph to a certain depth repeating this operation. I.e. when I calculate the dominator tree for a child of the root node I want to pretend that the root node has been removed from the graph. My question is whether

Graph library for Cocoa [closed]

心不动则不痛 提交于 2019-12-03 00:32:45
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Is there any good library for some graph-app? I want to create nodes, add weighted edges, etc… EDIT I need a graph (like on the image below) not a plot. According to the GraphViz documentation something like this should do the layout job: - (void) testGraph

Where can I learn more about “ant colony” optimizations?

半城伤御伤魂 提交于 2019-12-03 00:23:30
I've been reading things here and there for a while now about using an "ant colony" model as a heuristic approach to optimizing various types of algorithms. However, I have yet to find an article or book that discusses ant colony optimizations in an introductory manner, or even in a lot of detail. Can anyone point me at some resources where I can learn more about this idea? On the off chance that you know German (yes, sorry …), a friend and I have written an introduction with code about this subject which I myself find quite passable. The text and code uses the example of TSP to introduce the

NoSQL Solution for Persisting Graphs at Scale

房东的猫 提交于 2019-12-03 00:22:14
问题 I'm hooked on using Python and NetworkX for analyzing graphs and as I learn more I want to use more and more data (guess I'm becoming a data junkie :-). Eventually I think my NetworkX graph (which is stored as a dict of dict) will exceed the memory on my system. I know I can probably just add more memory but I was wondering if there was a way to instead integrate NetworkX with Hbase or a similar solution? I looked around and couldn't really find anything but I also couldn't find anything

'Head First' Style Data Structures & Algorithms Book? [closed]

牧云@^-^@ 提交于 2019-12-03 00:20:51
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I loved the Head First series book on object oriented design. It was a very gentle and funny introduction to the subject. I am

Is there any implementation of bidirectional search for Dijkstra algorithm? [closed]

僤鯓⒐⒋嵵緔 提交于 2019-12-03 00:17:55
I am looking for an implementation of bidirectional search (a.k.a. "meet in the middle" algorithm) for Dijkstra (or any other source-to-destination shortest path algorithm) in Java. As bidirectional search processing is trickier than it looks like ( Graph Algorithms, p.26 ), I want to consider an existing implementation before reinventing the wheel! P.S.: I am talking about bidirectional search , not to be confused with a bidirectional graph) Here is an example of a tricky graph: Yes, there is at least in Java: https://github.com/coderodde/GraphSearchPal/blob/master/src/main/java/net/coderodde

Clique problem algorithm design

♀尐吖头ヾ 提交于 2019-12-02 23:53:07
One of the assignments in my algorithms class is to design an exhaustive search algorithm to solve the clique problem. That is, given a graph of size n , the algorithm is supposed to determine if there is a complete sub-graph of size k . I think I've gotten the answer, but I can't help but think it could be improved. Here's what I have: Version 1 input : A graph represented by an array A[0,... n -1], the size k of the subgraph to find. output : True if a subgraph exists, False otherwise Algorithm (in python-like pseudocode): def clique(A, k): P = A x A x A //Cartesian product for tuple in P:

count of distinct acyclic paths from A[a,b] to A[c,d]?

十年热恋 提交于 2019-12-02 22:16:39
I'm writing a sokoban solver for fun and practice, it uses a simple algorithm (something like BFS with a bit of difference). now i want to estimate its running time ( O and omega). but need to know how to calculate count of acyclic paths from a vertex to another in a network. actually I want an expression that calculates count of valid paths, between two vertices of a m*n matrix of vertices. a valid path: visits each vertex 0 or one times. have no circuits for example this is a valid path: alt text http://megapic.ir/images/f1hgyp5yxcu8887kfvkr.png but this is not: alt text http://megapic.ir

How to serialize a graph structure?

血红的双手。 提交于 2019-12-02 22:02:31
Flat files and relational databases give us a mechanism to serialize structured data. XML is superb for serializing un-structured tree-like data. But many problems are best represented by graphs. A thermal simulation program will, for instance, work with temperature nodes connected to each others through resistive edges. So what is the best way to serialize a graph structure? I know XML can, to some extent, do it---in the same way that a relational database can serialize a complex web of objects: it usually works but can easily get ugly. I know about the dot language used by the graphviz

How do you solve the 15-puzzle with A-Star or Dijkstra's Algorithm?

筅森魡賤 提交于 2019-12-02 20:44:35
I've read in one of my AI books that popular algorithms (A-Star, Dijkstra) for path-finding in simulation or games is also used to solve the well-known "15-puzzle". Can anyone give me some pointers on how I would reduce the 15-puzzle to a graph of nodes and edges so that I could apply one of these algorithms? If I were to treat each node in the graph as a game state then wouldn't that tree become quite large? Or is that just the way to do it? A good heuristic for A-Star with the 15 puzzle is the number of squares that are in the wrong location. Because you need at least 1 move per square that