PHP Classes

Kruskal: Find minimum spanning tree using Kruskal algorithm

Recommend this page to a friend!
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (2)   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStar 53%Total: 1,231 All time: 3,099 This week: 175Up
Version License Categories
kruskal 1.0.0GNU General Publi...Algorithms


This class implements the Kruskal algorithm to find the minimum spanning tree that traverses a given set of nodes of a graph.

A graph is described as set of nodes and arcs connecting them. The class takes an associative array that has as indexes the letters of the starting and ending node. The respective array entry values represent the cost of traversing two nodes.

The class returns the minimum spanning arcs and the minimum cost to traverse them.

Innovation Award
PHP Programming Innovation award nominee
November 2004
Number 4
Optimization techniques have always been important to solve real world situations that often turn difficult to resolve problems in situations with viable solutions.

The Kruskal algorithm provides a solution to find an optimized path that goes through multiple traversal points like the travelling salesman problem, that has also applications in the networking area.

This class provides a PHP implementation of the Kruskal algorithm that may have applications in graph drawing and solving other problems that may benefit from path finding optimization techniques.

Manuel Lemos
Picture of nikita m. kozlvovsky
Name: nikita m. kozlvovsky <contact>
Classes: 2 packages by
Country: Russian Federation Russian Federation
Age: 38
All time rank: 70721 in Russian Federation Russian Federation
Week rank: 387 Up19 in Russian Federation Russian Federation Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file example.php Example a simple example
Plain text file Kruskal.class.php Class a base class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:3,099
This week:175Up
User Ratings User Comments (1)
 All time
So good
11 years ago (Kan)