Our Sample Works

Essay-Samples offers to evaluate samples of various types of papers. We have gathered all of them to show you the qualification and high professional level of our writers. # Market and Social Systems on the Internet

0 / 5. 0 Category: Coursework

Subcategory: Computer Science

Level: College

Pages: 1

Words: 275

Student name
Professor name
Market and Social Systems on the Internet
Date
Part 1
4. Negative edge weights and Dijkstra’s algorithm:
Give an example of a directed graph with negative weight edges for which Dijkstra’s algorithm produces incorrect answers. (5 points)
Dijkstra’s algorithm works by updating distance between an existing point and a new point for neighboring points. The shortest path in the point is calculated when one of the value is negative when the two points are positive it assumes that the point does not exist. The algorithm has the limitation that the results cannot be negative results from negative points that brings negative results are not used (Easley et al., 2010).
Give an example of a directed graph with negative weight edges for which Dijkstra’s algorithm produces correct answers. (5 points)
Graph G (V, E) with vertices V = {A, B}, edges E = {(A, B), (B, A)} and weight w (A, B) = -1, w (B, A) = +3. From this example the negative weight is used. All the distance of the nodes are defined correctly.
Explain why Dijkstra’s works correctly in certain cases and incorrectly in others. (5 points)
Dijkstra’s algorithm works correctly by computing the distance between two points by using standard deviation. The algorithm works well when the value between the two points is positive which will give relatively similar values for multiple points. The algorithm gives an incorrect answer when the distance between the points is nega…

## Free Market and Social Systems on the Internet Essay Sample, Download Now

Don’t waste time!

Order Original Essay on the Similar Topic

Get an original paper on the same topic

from \$10 per-page