Hi guys,

I just finished doing my homework assignment on spanning trees and I wanted some reassurance that I've done it correctly. I'm not looking for someone to state a correction, but rather let me know I've made a mistake (if I have).

Here are my edges for Prim's Algorithm
(1,2) - (1,5) - (5, 7) - (7, 11) - (7, 8) - (8, 4) - (2, 3) - (11, 13) - (3, 10) - (10, 12) - (12, 9) - (12, 14)

Here are my edges for Kruskal's Algorithm
(7, 11) - (1, 2) - (10, 12) - (4, 8) - (7, 8) - (9, 12) - (1, 5) - (5, 7) - (2, 3) - (12, 14) - (11, 13) - (3, 10) - (5, 6)

Looks good

Looks good

Thanks for looking it over! I suffer from pretty bad OCD (checking & rechecking if doors are closed, books are in alphabetical order, TV remotes parallel, etc...etc...etc) and I checked and re-checked the assignment too many times to count. This is only one of the three such examples and I didn't want to have someone check the WHOLE assignment.

Thanks a bunch for such a fast response. The other two are "harder" (more complex), but now that I've been assured I"m on the right track, I think I'll go turn in my assignment.

i think for prim's algorithm one last edge is missing.
5-6

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.