Determine the kruskal algorithm in detail

Assignment Help Data Structure & Algorithms
Reference no: EM132257845

Question: 1. Kruskal's algorithm will run on a disconnected graph without any problem. Just that the minimum spanning tree will be for the connected portion of graph. The disconnected vertices will not be included in the output. This is because, Kruskal's algorithm is based on edges of the graph.The loop iterates over the sorted edges. This means that it is considering those portions of the graph that are connected through the edges and generates minimum spanning tree (MST) for the connected portion of the graph. The disconnected vertices are never considered and hence not included at all in output.

2. Let us consider the 1st implementation of Prim's algorithm. Prim's algorithm will go into infinite loop and can not generate MST for disconnected graphs. Look at the loop condition , it terminates when the number of vertices in the MST is the same as the number of vertices in the graph. This condition can not be achieved if the graph is disconnected . For example let's take some vertex u already in B and a disconnected vertex v in graph . Now we can not find an minimum length edge from u (any vertex in B) to v. So v can not be included in the set B. So B will never be equal to N and the loop goes into infinite loop. Therefore Prim's algorithm can not work on disconnected graphs as it works by considering each of the graph' s vertices unlike Kruskal's algorithm, which considers edges (the connected parts of graph)

Reference no: EM132257845

Questions Cloud

Produce a report on the role and acquisition : OIM5009-A: Management of Information Systems - Produce a report on the role and acquisition of IS for BLL for its senior management and line management
Would you expect the capacity increase to have an effect : BA 270 Business Process Management : Would you expect holding cost to go down with increases in maximum capacity? Explain your answer.
What is the sampling distribution of the sample mean : Suppose we have n = 6 observations x1, . . . , x6. What is the sampling distribution of the sample mean
Develop a list of changes for the operations function : ITS631 Read the case: Prime Bank of Massachusetts, available in the Operations Management textbook, Chapter 2. Develop a list of changes for the operations.
Determine the kruskal algorithm in detail : Kruskal's algorithm will run on a disconnected graph without any problem. Just that the minimum spanning tree will be for the connected portion of graph.
Discuss at least one of the ways to test a threat mitigation : ISOL 536 Security Architecture and Design Threat Modeling. Discuss at least one of the ways to test a threat mitigation (one page only with references and APA)
Are these duties in the best national interest of the usa : Who gains the most and from antidumping duties levied by the USA on imports of magnesium from China and Russia? How?
Make up a research question about two numerical variables : Make up a research question about two numerical variables in your data, establishing the response and explanatory variables
Analyze role of cultural intelligence in leading effectively : Analyze the role of cultural intelligence in leading effectively in a cross-cultural context. Assess the potential application of cultural frameworks

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Recurrence-worst case running time-recursive binary search

Provide a recurrence for worst case running time of recursive Binary Search function in terms of n, the size of the search array. Solve the recurrence.

  How output of leaky bucket policer can be fed in second

Illustrate how output of the leaky bucket policer can be fed into second leaky bucket policer so that two leaky buckets in series police average rate, peak rate, and burst size.

  Tower of hanoi problem and write an algorithm to solve it

How do we use 4-discs stack to solve tower of hanoi problem and write an algorithm to solve it?

  Develop a class template for red-black trees

Ask you to develop class templates for various trees. You should also write driver programs to test your answers as instructed at the end of this chapter.

  Are there any full binary trees on even number of vertices

A binary tree is a full binary tree if each vertex has either two nonempty children or two empty children (a vertex with two empty children is called a leaf.)

  Write functions to implement the merge sort algorithms

Exercise : Write functions to implement the split, merge, and merge sort algorithms for files.

  Give the adjacency matrix representation of the graph

Give the adjacency matrix representation of the graph in Figure. Find the shortest path between node A and all other nodes in the graph in Figure. Find the minimum spanning tree of the graph in Figure.

  Solve the following maze with the algorithm

Solve the following maze with the algorithm of your choice. The idea is to come up with a fully automated method to find the shortest path from S to E using minimum number of movements.

  Create a doubly linked list dll that has instance variables

Suppose you create a doubly linked list DLL that has three instance variables: head, tail, length. The data is stored in Node objects with next and prev.

  Height information in an avl tree

Design a linear-time algorithm that verifies that the height information in an AVL tree is correctly maintained and that the balance property is in order.

  Choose at least two operating system process-scheduling

write 400-600 words that respond to the following questions with your thoughts ideas and comments. this will be the

  Representation of the newick format

Create the graphical representation of Newick format tree given below. Label each leaf with appropriate sequence identifier, and label each branch with its appropriate length.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd