Homework Graph Algorithms Dijkstra's and Bellman Ford(1)

docx

School

University of Texas, Dallas *

*We aren’t endorsed by this school

Course

3345

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

5

Uploaded by ConstableDinosaur3502

Report
Homework – Graph Concepts and Algorithms A. Dijkstra’s algorithm
B. Graph Concepts For each of the following graph-based computational tasks, specify the type of graph most appropriate for the data in question in terms of undirected or directed, and unweighted or weighted. In addition, choose the graph algorithm from the following list best suited to computing a solution: Breadth-First Search Depth-First Search Dijkstra’s Algorithm Topological Sort N/A to DFS, BFS, TOPO, or shortest path a) You want to model a collection of Java files in a project. You know which files exist and which other Java files they depend on using. You want to determine the order that the files have to be compiled in before a given file f can be compiled and run. b) You want to model how a tweet gets re-tweeted by followers on Twitter. You have data on who the users of Twitter are and all the followers of each user. Given a source, a tweet can be re- tweeted by any follower of that source. If a tweet gets arbitrarily re-tweeted k times, you want to know which users could have seen the tweet. c) You have locations and the distances between them. You want to know the shortest cost path from one source location to all other locations. C. Bellman-Ford algorithm
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
a) Given a graph G = (V, E) with positive edge weights, the Bellman-Ford algorithm and Dijkstra’s algorithm can produce different shortest-path trees despite always producing the same shortest- path weights. Explanation: b) Perform Bellman-Ford Algorithm on the following graph showing the edges list, d and p tables as discussed in class (see the excel sheet available on eLearning) D. Floyd-Warshall Algorithm
Apply Floyd-Warshall, all sources shortest path algorithm on the following graph: