All-KNN (All-K-Nearest-Neighbors) in Cover Trees - data-structures

I think I know how to do K-Nearest-Neighbors using Cover Trees. (Incidentally: can anybody point me to a run-time complexity analysis of this?), BUT I am looking for all-kNN (that is: find the kNN of all points in the tree).

Related

Algorithms for Tree Decomposition

I want to understand the optimum algorithm for a tree decomposition of any graph. Is there any good sites where I can look up because I cannot find proper materials to understand the logic behind tree decomposition.
The PACE (Parameterized Algorithms and Computational Experiments Challenge) challenge is a competition for implementing fast algorithms (with a worst-case exponential running time). In 2016 and 2017, one of the challenges was to compute tree decompositions. See here for reports and (inside the reports) the links to the implementations of submitted solutions.

Graph Search algorithms vs. graph optimization

I have been looking at a lot of graph searches -both informed and uninformed. I have also looked at and coded some optimization problems such as hill-climbing. My question is, how can I relate the two types of algorithms?
To be a little more clear, here is an example:
Let's say I run a graph algorithm like Depth first Iterative Deepening. I run it for one depth and get a goal node, then I run it again at a different depth and find a goal node and so on. So now, I have a set of possible goal nodes. Could I run an optimization algorithm like hill climbing to find which one is "optimal" according to different limitations?
One of the notions you encounter in graph search algorithms is optimality. You should consider that here optimality is just about the algorithm and not about the goal. Meaning that, if an algorithm is optimal it should return the minimum cost solution.
Now, if you want to optimize something it's completely a different problem. In this case the quality of the solution is of most importance not the way you achieve it.
Algorithms like Genetic Algorithms, PSO, ... and many more optimization methods exists to address this issue.
BTW, sometimes we combine a graph search method like A* with an optimization algorithm to gain better results from the optimization algorithm.
Note: The term Graph Optimization is not related to the topic Graph Search that I think is your main topic according to your question.

Approximate Edit distance tree - Exact Edit path

I've been looking for an algorithm to efficiently compute an edit path between two trees, a path that does not have to correspond to shortest edit distance but preferably a relatively short one.
The case is that I have two directory trees, consisting of directories and files, and want to compute a sequence of deletes, inserts and renames that will transform one to the other.
I have tried searching both stackoverflow and the wild web but all I find is algorithms for computing shortest edit distance, but they all have high scaling factors.
So my question is, is there any more efficient way then for example "Zhang and Shasha" when I don't need the optimum distance?
Kind regards
There is the Klein algorithm that performs slightly better than "Zhang and Sasha", however it remains of very high complexity in both space and time for practical purpose.
There is an algorithm here that is in fact an heuristic, since the authors misused the term approximation.
It reduces the problem to a series of maximum weighted cliques for which it exists several approximation and heuristics, even a greedy approach could here perform reasonably well.
What is true for graphs is true for trees, you could therefore use a graph kernel convolution approach.
If you are looking for an off the shelf implementation (of an unspeficied algorithm, I woudl guess Zhang or Klein), you can check here

search of the K-first short paths algorithm

I have found many algorithms and approaches that talk about finding the shortest path or the best/optimal solution to a problem. However, what I want to do is an algorithm that finds the first K-shortest paths from one point to another. The problem I'm facing is more like searching through a tree, when in each step you take there are multiple options each one with its weight. What kinds of algorithms are used to face this kind of problems?
There is the 2006 paper by Jose Santos
comparing three different K-shortest path finding algorithms.
Yen's algorithm implementation:
http://code.google.com/p/k-shortest-paths/
Easier algorithm & discussion:
Suggestions for KSPA on undirected graph
EDIT: apparently I clicked on a link, because I thought I was answering to a new question; ignore this if - as is very likely - this question isn't important to you anymore.
Given the restricted version of the problem you're dealing with, this becomes a lot simpler to implement. The most important thing to notice is that in trees, shortest paths are the only paths between two nodes. So what you do is solve all pairs shortest paths, which is O(n²) in trees by doing n BFS traversals, and then you get the k minimal values. This probably can be optimized in some way, but the naive approach to do that is sort the O(n²) distances in O(n² log n) time and take the k smallest values; with some book keeping, you can keep track of which distance corresponds to which path without time complexity overhead. This will give you better complexity than using a KSPA algorithm for O(n²) possible s-t-pairs.
If what you actually meant is fixing a source and get the k nodes with the smallest distance from that source, one BFS will do. In case you meant fixing both source and target, one BFS is enough as well.
I don't see how you can use the fact that all edges going from a node to the nodes in the level below have the same weight without knowing more about the structure of the tree.

Names of Graph Traversal Algorithms

What I'm looking for is a comprehensive list of graph traversal algorithms, with brief descriptions of their purpose, as a jump off point for researching them. So far I'm aware of:
Dijkstra's - single-source shortest path
Kruskal's - finds a minimum spanning tree
What are some other well-known ones? Please provide a brief description of each algorithm to each of your answers.
the well knowns are :
Depth-first search http://en.wikipedia.org/wiki/Depth-first_search
Breadth-first search http://en.wikipedia.org/wiki/Breadth-first_search
Prim's algorithm http://en.wikipedia.org/wiki/Prim's_algorithm
Kruskal's algorithm http://en.wikipedia.org/wiki/Kruskal's_algorithm
Bellman–Ford algorithm http://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm
Floyd–Warshall algorithm http://en.wikipedia.org/wiki/Floyd%E2%80%93Warshall_algorithm
Reverse-delete algorithm http://en.wikipedia.org/wiki/Reverse-Delete_algorithm
Dijkstra's_algorithm http://en.wikipedia.org/wiki/Dijkstra's_algorithm
network flow
Ford–Fulkerson algorithm http://en.wikipedia.org/wiki/Ford%E2%80%93Fulkerson_algorithm
Maximum Flow http://en.wikipedia.org/wiki/Maximum_flow_problem
A few off of the top of my head:
Depth-first and Breadth-first traversals, really just two different ways of touching all of the nodes.
Floyd-Warshall algorithm finds the shortest paths between any pair of points, in (big-theta)(v^3) time.
Prim's algorithm is an alternative to Kruskal's for MST.
There are also algorithms for finding fully connected components, which are groups of nodes where you can get from any member in the component to any other member. This only matters for "directed graphs", where you can traverse an edge only one direction.
Personally, I think the coolest extension of graph theory (not exactly related to your question, but if you're interested in learning more about graphs in general its certainly worth your while) is the concepts of "flow networks": http://en.wikipedia.org/wiki/Flow_network . It is a way of computing about, say, how much electricity can one distribute over houses with a variety of power needs and requirements, and a variety of power stations.
Graph algorithms
http://en.wikipedia.org/wiki/List_of_algorithms#Graph_algorithms
All algorithms in one place
http://en.wikipedia.org/wiki/List_of_algorithms
Dictionary of algorithms and data structures:
Dictionary: http://xlinux.nist.gov/dads/
By area: http://xlinux.nist.gov/dads/termsArea.html
By terms type: http://xlinux.nist.gov/dads/termsType.html
List of all implementations in diff. languages: http://xlinux.nist.gov/dads/termsImpl.html

Resources