[Solved] CSCE-629 Analysis of Algorithms-Assignment # 2

$25

File Name: CSCE-629_Analysis_of_Algorithms-Assignment_#_2.zip
File Size: 433.32 KB

SKU: [Solved] CSCE-629 Analysis of Algorithms-Assignment # 2 Category: Tag:
5/5 - (1 vote)

(

  1. Design algorithms for Min(H), Insert(H,a), and Delete(H,i), where the set H is stored in a heap, a is the element to be inserted into the heap H, and i is the index of the element in the heap H to be deleted. Analyze the complexity of your algorithms.

Remark. In the following questions, you can assume that your graphs are connected.

  1. Write the psuedo-code for the Dijstras algorithm that solves the Single-Source Shortest Path Analyze the complexity of the algorithm (you can assume that the algorithm uses a heap for fringes and you can use your results in Question 1 directly). Give a formal proof that the algorithm works correctly when the edge weights are all non-negative.
  2. Develop a linear-time (i.e., O(m)-time) algorithm that solves the Single-Source Shortest Path problem for graphs whose edge weights are positive integers bounded by 10. ( You can either modify Dijstras algorithm or consider using Breath-First-Search.)
  3. Consider an extended version of the Shortest-Path Suppose that you want to traverse from city s to city t. In addition, for some reason, you also need to pass through cities x, y, and z (in any order) during your trip. Your objective is to minimize the cost of the trip. The problem can be formulated as a graph problem as follows: Given a positively weighted directed graph G and five vertices s, t, x, y, z, find a path from s to t that contains the vertices x, y, z such that the path is the shortest over all paths from s to t that contain x, y, z, assuming that these paths are allowed to contain repeated vertices and edges. Develop an O(mlogn)-time algorithm for this problem.

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CSCE-629 Analysis of Algorithms-Assignment # 2
$25