farm irrigation with kruskal algorithm