Kruskal's and Prim's algorithms can both be used to find the minimum spanning tree of a network and minimum length of cable needed to connect villages to a town. Kruskal's algorithm works by selecting the shortest edge that does not form a cycle, while Prim's algorithm starts from any vertex and selects the shortest edge connected to the growing tree. Both algorithms found that the minimum cable length to connect the five villages to Avonford was 18 units using the edges ED, AB, CD, AE, and EF.