Algorithm to find the minimum spanning tree on a planar graph

Click For Summary
SUMMARY

The discussion focuses on selecting the optimal algorithm for finding the minimum spanning tree (MST) on a planar graph, specifically comparing Prim's algorithm (both with an array and a priority queue) and Kruskal's algorithm with a priority queue. The consensus is that Kruskal's algorithm is superior for this purpose due to its time complexity of O(m log(m)), where m represents the number of edges. In contrast, Prim's algorithm with a priority queue has a time complexity of O(n log(n) + m log(n)), which is less efficient when m is significantly larger than n.

PREREQUISITES
  • Understanding of graph theory, specifically planar graphs
  • Familiarity with algorithm complexity analysis
  • Knowledge of Prim's and Kruskal's algorithms
  • Experience with data structures such as priority queues
NEXT STEPS
  • Study the properties of planar graphs and their edge-vertex relationships
  • Learn about the implementation of Kruskal's algorithm using a priority queue
  • Explore the efficiency of Prim's algorithm in various data structures
  • Investigate other algorithms for minimum spanning trees, such as Borůvka's algorithm
USEFUL FOR

This discussion is beneficial for computer science students, algorithm enthusiasts, and software developers focused on optimizing graph-related algorithms, particularly in the context of planar graphs.

TheMathNoob
Messages
189
Reaction score
4

Homework Statement


I have the following algorithms: Prime MST with array, Prime MST with priorityq and Kruskal with priorityq. I have to choose the best algorithm to find the minimum spanning tree on a planar graph. A planar graph has the property in which the number of edges is in O(number of vertices). What does that mean?. The answer key says that kruskal is better.

Homework Equations


m=edges
n=vertices[/B]
Prime MST with array O(n^2+m)--> O(n^2)
Prime MST with pq: O(nlog(n)+mlog(n)) m>n O(mlogn)
Kruskal with pq: O(mlog(m))

The Attempt at a Solution


m in O(n) means to me that there is at most n number of edges and to me that looks weird because of the property of a maximal planar graph which says that at most a planar graph can have m= 3n-6 edges.
 
Physics news on Phys.org
TheMathNoob said:
A planar graph has the property in which the number of edges is in O(number of vertices).
I would take that to mean that there exists some real constant C such that for every ##n\in\mathbb{N}##, the number of edges of every planar graph with ##n## vertices is less than or equal to ##Cn##. It is not necessarily the case that ##C=1## as you have surmised in your last paragraph.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
3
Views
4K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
5
Views
2K