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.
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.