Talk:Kruskal's algorithm

message: Someone should explain all the variable names in it. particularly what "u" refers to.  — Preceding unsigned comment added by 141.219.232.115 (talk) 00:51, 24 October 2013 (UTC)
thread_title: Confusion on algorithm

message: Many problems with this proof.  Confusion between vertices and edges, etc., etc.. --zero 05:56, 13 Oct 2003 (UTC)
replies: text: A simple oversight I'm sure, but it's certainly not obvious that |E| >= |V| in any connected graph because that is false.  This fails precisely on trees, where |E| = |V| - 1. 129.128.211.134 (talk) 21:17, 25 November 2011 (UTC)
thread_title: Untitled

message: The caption should not describe the figure as a complete network - in a complete network, all edges are present. —The preceding unsigned comment was added by 69.159.78.115 (talk • contribs) 21:15, 4 February 2006  (UTC)
:I've gone ahead and fixed it up.  It said "complete network", which might be someone's jargon for "a graph in which all vertices form a single well-connected component".  A quick Google search suggested it is not.  In the future, be bold and fix things as you see them! --Mgreenbe 19:31, 4 February 2006 (UTC)
thread_title:  caption on figure 

message: Minimum Sppaning Forest is a subset of edges that "cover" all vertexs, not a set of minimum spanning trees of each connected component —The preceding unsigned comment was added by 201.129.158.57 (talk • contribs) 23:13, 12 February 2006  (UTC)
:You are fundamentally correct, but watch: minimal such subsets of edges in a connected graph induce trees.  In a disconnected graph, each component treated individually is spanned by a tree; the union of these is a forest.  Thus a minimal spanning forest is a forest of minimal spanning trees. --Mgreenbe 21:47, 12 February 2006 (UTC)
thread_title:  Minimum Spanning Forest 

message: What is the difference between Kruskal's and Borůvka's algorithms? Some study material I have describes some algorithm which is labeled as Borůvka/Kruskal. And I see no difference between the two. Can someone point to the difference?--Alvin-cs ✉ 13:20, 8 September 2007 (UTC)
thread_title:  What is the difference between Kruskal's and Borůvka's algorithms? 

message: I have now had three teachers use the union-find approach to both understanding, and analyzing kruskal's algorithm. Could we possibly get a section on this? 129.59.157.168 (talk) 06:14, 10 February 2009 (UTC)
thread_title:  More data on the union/find operations 

message: The Kruskal psuedocode could quite easily be called obscurocode. After all, if it were so clear, why all the lines of comments? My feeling is that a more useful text would be to use pure Python (by pure, I mean no 3rd party libraries needed). For example, the following public domain search (by Guido) has no comments and should be clear to most readers.
def find_path(graph, start, end, path=[]):
  path = path + [start]
  if start == end:
    return path
  if not graph.has_key(start):
    return None
  for node in graph[start]:
    if node not in path:
      newpath = find_path(graph, node, end, path)
      if newpath: return newpath
  return None
If I could figure out the use of the cluster and which node it should be assigned to after merging the clusters for each node, I would try to put it into Python.
As an alternative, this would be my suggestion, using the above search.
def Kruskal(graph):
  tree={}
  nodes=node_list(graph)
  n=len(nodes)
  edges=graph.keys()
  edges.sort(key=lambda x:graph[x][2])
  for e in edges:
    v=graph[e]
    loop=find_path(tree, v[1], v[0])
    if not loop:
      tree[e]=v
      if len(tree)>n-2:break
  return tree
41.246.48.90 (talk) 10:31, 11 April 2009 (UTC)
thread_title:  Pseudocode 

message: I've made an animation to show the process of finding minimal spanning tree.
Do you have any comments for animation? Do you have any objections not to include animation to article?
Schulllz (talk) 15:18, 30 January 2014 (UTC)
thread_title:  Animation