1. Homepage
  2. Homework
  3. CS 430 – Spring 2021 Introduction to Algorithms - Homework 6 - Graph Algorithms
This question has been solved

CS 430 – Spring 2021 Introduction to Algorithms - Homework 6 - Graph Algorithms

Engage in a Conversation
CS 430Introduction to Algorithms美国AmericaIllinois Institute of TechnologyIITGraph Algorithms

CourseNana.COM

CS 430 Introduction to Algorithms Spring Semester, 2021 CourseNana.COM

Assigned: April 21 CourseNana.COM

Due: May 5 CourseNana.COM

Homework 6 CourseNana.COM

Problem 1 Present full pseudocode of a variant of Prim’s algorithm that runs in time O(|V |2) for a graph G = (V, E) given by an adjacency matrix A. Analyze the running time. CourseNana.COM

Note: do not use any procedure or data structures operation. CourseNana.COM


Problem 2 Give an example of a weighted directed graph G with negative-weight edges, but CourseNana.COM

no negative-weight cycle, such that Dijkstra’s algorithm incorrectly computes the shortest-path distances from some start vertex v. Use the algorithm version from the handout. CourseNana.COM

A four-vertex example is possible. Draw the graph, mention the start vertex, show the result of Dijkstra’s algorithm, and point out for which vertex the result is incorrect. CourseNana.COM

(This was on a previous final exam) CourseNana.COM

Problem 3 A complete digraph has exactly one directed edge (also called arc) from every vertex u to every vertex v other than itself. Let G be a complete digraph with non-negative arc weights. Let the capacity of a path be the minimum arc weight along it, and let the capacity of a pair of nodes (u,v) be the maximum capacity of a path from u to v. Find a Dijkstra-like algorithm to find, for all v ̸= s, the capacity of (s, v). (Node s is a fixed source.) CourseNana.COM

Present the pseudocode, analyze the running time, and prove correctness. CourseNana.COM

Problem 4 Assume that the weights on the edges of directed graph G are integers in the range from 1 to K. Give a new method for implementing EXTRACT-MIN(Q) and DECREASE-KEY(Q, v, d[v]) so that Dijkstra’s algorithm’s running time becomes O(|E| + K|V |). CourseNana.COM

Describe the data structure and present the pseudocode for the two operations used by Dijkstra’s algorithm, together with correctness and running-time analysis.  CourseNana.COM

Get in Touch with Our Experts

WeChat (微信) WeChat (微信)
Whatsapp WhatsApp
CS 430代写,Introduction to Algorithms代写,美国代写,America代写,Illinois Institute of Technology代写,IIT代写,Graph Algorithms代写,CS 430代编,Introduction to Algorithms代编,美国代编,America代编,Illinois Institute of Technology代编,IIT代编,Graph Algorithms代编,CS 430代考,Introduction to Algorithms代考,美国代考,America代考,Illinois Institute of Technology代考,IIT代考,Graph Algorithms代考,CS 430help,Introduction to Algorithmshelp,美国help,Americahelp,Illinois Institute of Technologyhelp,IIThelp,Graph Algorithmshelp,CS 430作业代写,Introduction to Algorithms作业代写,美国作业代写,America作业代写,Illinois Institute of Technology作业代写,IIT作业代写,Graph Algorithms作业代写,CS 430编程代写,Introduction to Algorithms编程代写,美国编程代写,America编程代写,Illinois Institute of Technology编程代写,IIT编程代写,Graph Algorithms编程代写,CS 430programming help,Introduction to Algorithmsprogramming help,美国programming help,Americaprogramming help,Illinois Institute of Technologyprogramming help,IITprogramming help,Graph Algorithmsprogramming help,CS 430assignment help,Introduction to Algorithmsassignment help,美国assignment help,Americaassignment help,Illinois Institute of Technologyassignment help,IITassignment help,Graph Algorithmsassignment help,CS 430solution,Introduction to Algorithmssolution,美国solution,Americasolution,Illinois Institute of Technologysolution,IITsolution,Graph Algorithmssolution,