document.write( "Question 1161148: Is it B? I want to check my answer.\r
\n" );
document.write( "\n" );
document.write( "Which is the cost of the minimum spanning tree of the weighted graph using Kruskal's Algorithm? \r
\n" );
document.write( "
\n" );
document.write( "\n" );
document.write( "A. 28\r
\n" );
document.write( "\n" );
document.write( "B. 30\r
\n" );
document.write( "\n" );
document.write( "C. 31\r
\n" );
document.write( "\n" );
document.write( "D. 40\r
\n" );
document.write( "
\n" );
document.write( "\n" );
document.write( "the question is provided in the link here: https://i.imgur.com/zzzvcG9.png \n" );
document.write( "
Algebra.Com's Answer #784730 by Theo(13342) You can put this solution on YOUR website! i get 28 using kruskal. \n" ); document.write( "i also used prim and got the same answer. \n" ); document.write( "using kruskal i did the following: \n" ); document.write( "i looked for the link with a weight of 1. \n" ); document.write( "that was link AB. \n" ); document.write( "i then looked for a link with a weight of 2. \n" ); document.write( "that was link DF. \n" ); document.write( "it was not connected to node A or B, so i drew it separate. \n" ); document.write( "i then looked for a link with a weight of 3. \n" ); document.write( "that was link EH. \n" ); document.write( "it was not connected to node A or B or D or F, so i drew it separate. \n" ); document.write( "i then looked for a link with a weight of 4. \n" ); document.write( "that was link HG. \n" ); document.write( "it was connected to node H, so i drew it connected there. \n" ); document.write( "so far my nodes were ABDFEHG \n" ); document.write( "i then looked for a link with a weight of 5. \n" ); document.write( "that was link BG. \n" ); document.write( "it was connected to node B, so i drew it connected there. \n" ); document.write( "i then looked for a link with a weight of 6. \n" ); document.write( "that was link AC. \n" ); document.write( "it was connected to node A so i drew it connected there. \n" ); document.write( "i then looked for a link with a a weight of 7. \n" ); document.write( "that was link CD. \n" ); document.write( "it was connected to node C, so i drew it connected there. \n" ); document.write( "i then looked for a link with a weight of 8. \n" ); document.write( "that was link BD. \n" ); document.write( "it was connected to node B and D forming a cycle (closed loop) so i rejected it. \n" ); document.write( "i then looked for a link with a weight of 9. \n" ); document.write( "that was link CE. \n" ); document.write( "it was connected to node C and E forming a cycle, so i rejected it. \n" ); document.write( "i then looked for a link with a weight of 10. \n" ); document.write( "that was link GF. \n" ); document.write( "it was connected to node G and F forming a cycle, so i rejected it. \n" ); document.write( "i then looked for a link with a weight of 11. \n" ); document.write( "that was link EF. \n" ); document.write( "that was connected to node E and F forming a cycle, so i rejected it. \n" ); document.write( "that was the end of it. \n" ); document.write( "my spanning tree was, starting from node E. \n" ); document.write( "EH with a weight of 3. \n" ); document.write( "HG with a weight of 4. \n" ); document.write( "BG with a weight of 5 \n" ); document.write( "AB with a weight of 1 \n" ); document.write( "AC with a weight of 6 \n" ); document.write( "CD with a weight of 7 \n" ); document.write( "DF with a weight of 2 \n" ); document.write( "there were all 8 nodes from the weighted graph. \n" ); document.write( "there were 7 links connected them. \n" ); document.write( "the spanning tree had a total weight of 28. ***** \n" ); document.write( "that, i believe, should be your answer. \n" ); document.write( "here's my diagram of what i drew. \n" ); document.write( "it pays to string them out and leave enough space for the one that aren't connected initially so you can see the actual paths clearly.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( " \r\n" ); document.write( " \n" ); document.write( "\n" ); document.write( "check your paths again, and draw them out to see why you got 30 rather than 28.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "if you get a link that connects to two nodes that you already drew, that forms a cycle and need to be rejected.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "here's some references you might find helpful for both kruskal and prin.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "https://www.youtube.com/watch?v=4ZlRH0eK-qQ\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "https://www.tutorialspoint.com/data_structures_algorithms/spanning_tree.htm\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "https://www.tutorialspoint.com/data_structures_algorithms/kruskals_spanning_tree_algorithm.htm\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "https://www.tutorialspoint.com/data_structures_algorithms/prims_spanning_tree_algorithm.htm\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "prim and kruskal will get the same answer for this problem. \n" ); document.write( "since this was the first time i had to do a problem like this, i had many trials and errors until i gelled on the right procedure.\r \n" ); document.write( " \n" ); document.write( "\n" ); document.write( "check it out and verify that 28 should be the correct answer. \n" ); document.write( "let me know if you still think otherwise.\r \n" ); document.write( " \n" ); document.write( " \n" ); document.write( "\n" ); document.write( " \n" ); document.write( " |