How to find a minimum spanning tree in complete undirected graph? [duplicate] - algorithm

I was looking through some text about finding the EMST (Euclidean MST) using Delaunay triangulation technique, but also read somewhere that the EMST can be found through a sweep line algorithm. Since this would easier implementing, I would like to implement this rather than using a existing library.
Can anyone guide me/ direct me to a link to a (possibly free) paper/source that has this algorithm explained?

From this and going by the abstracts, this and this should get you started. They both use sweepline algorithms to obtain MST's

I think the simplest technique for finding Euclidean minimum spanning tree is Delaunay trinangulation, use Bowyer-Watson algorithm. It is very easy to implement, once you have that, you can just use something like Kruskal's algorithm, using the distance as the edge weight.

Related

Solving The House Drawing Problem With Graph Theory Algorithms

I was recently given the challenge of drawing a house with an x in the middle without lifting my pen, and without retracing any lines. Link to problem
The link above begins to dive into some of the graph theory related to the problem, however there is no mention of how one might go about solving this problem using graph theory algorithms.
What algorithms could be used here, and what would be the correct way to formulate this problem using graph theory language?
Two specific algorithms for constructing an Eulerian path are mentioned in the Wikipedia article on Eulerian paths. These are Fleury's algorithm and Hierholzer's algorithm.
Note that an algorithm that only finds an Euler cycle can also find an Euler trail by augmenting the graph with another edge that joins the 2 vertices that have an odd degree, then rotating the solution so that the added edge is first or last, then removing this edge from the solution found.

Which search algorithm does google maps use to find paths and why?

I am curious about it as somewhere I heard it is breadth first search but A* search is more faster than BFS?
I don't think Google would use either A* or BFS. They probably have some of their own proprietary algorithms. If you're looking for similar algorithms, I would look into Dijskstra's or because roads are almost planar graphs Fastest Shortest-Path For Planar Graphs.
Google always has something mysterious in its pocket. The best possible option among all the known option is Dijskstra's because of the planar graph solution, but as I said in first line that it alone could not be enough for such complex system there should be some supportive algorithms along with Dijskstra's. the another example that satisfies my answer is that google core algorithm also use some supportive algo like penguin,panda,KBT algo etc..

Fleury's algorithm for oriented graph

I am going to implement an algorithm for finding an Eulerian path in an oriented graph and am deciding which algorithm would be the best.
I have found Fleury's algorithm which seems neat but all the examples I have seen consider only non-oriented graphs. Does anyone know if this will work with an oriented graph?
It seems to me that adjacency list can be specified for every single vertex so it should work but I am not 100% sure.
What if there are paralel edges in the graph?
Thanks for any answer!
In a directed graph the inbound and outbound edge must be the same:http://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK4/NODE165.HTM

Developing a linear time algorithm to traverse a graph

I'm going through an algorithms textbook to improve my algorithm skills but I'm completely stuck on this question and it's bugging me. I think the underlying data structure is a graph but I don't even know where to begin with this problem. Can anyone give some insight? Thanks
You are given a topographical map that provides the maximum altitude
along the direct road between any two neighboring cities, and two
cities a and b. Come up with an a linear time algorithm that finds a
route from s to t that minimizes the maximum altitude. Roads can be
traversed in both directions.
This is a tricky question. I would assume that there are some hints in the chapter that are supposed to guide you towards the solution.
The problem you are describing is an instance of the minimax path problem, or widest path problem.
http://en.wikipedia.org/wiki/Widest_path_problem
According to wikipedia, there is a linear time algorithm, but it is pretty complicated, so I doubt the book expects you to figure that out. The simpler way to solve this problem is to find a minimum spanning tree. Due to the "min cut" property of a minimum spanning tree, the path connecting a and b along a minimum spanning tree will have the minimax property, meaning that the maximum altitude along this path will be the minimum of any path connecting a to b.
However, there is no linear time minimum spanning tree algorithm. On the other hand, if we can assume that the graph is planar -- which we probably can since it is a road map -- then it is possible to find a minimum spanning tree in linear time. So I think this is what they might be after. Does the chapter containing this problem talk about minimum spanning trees and/or planar graphs?

General purpose algorithm for triangulating an undirected graph?

I am playing around with implementing a junction tree algorithm for belief propagation on a Bayesian Network. I'm struggling a bit with triangulating the graph so the junction trees can be formed.
I understand that finding the optimal triangulation is NP-complete, but can you point me to a general purpose algorithm that results in a 'good enough' triangulation for relatively simple Bayesian Networks?
This is a learning exercise (hobby, not homework), so I don't care much about space/time complexity as long as the algorithm results in a triangulated graph given any undirected graph. Ultimately, I'm trying to understand how exact inference algorithms work before I even try doing any sort of approximation.
I'm tinkering in Python using NetworkX, but any pseudo-code description of such an algorithm using typical graph traversal terminology would be valuable.
Thanks!
If Xi is a possible variable (node) to be deleted then,
S(i) will be the size of the clique created by deleting this variable
C(i) will be the sum of the size of the cliques of the subgraph given by Xi and its adjacent nodes
Heuristic:
In each case select a variable Xi among the set of possible variables to be deleted with minimal S(i)/C(i)
Reference: Heuristic Algorithms for the Triangulation of Graphs

Resources