Question 4

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What is Shortest-Path Algorithms? What are various algorithms that fit this category? Why is it important for Graphs? Are there useful applications?

Shortest-path algorithms are used to find the shortest path between two vertices, these include: Dijkstra's Algorithm Bellman-Ford Algorithm Floyd-Warshall Algorithm They can be used for routing and navigation systems like GPS

Give an example of where Dijkstra's algorithm gives a wrong answer

A graph going containing A-B with a weight of 1 B-C with a weight of -2 A-C with a weight of 2 Since the algorithm doesn't consider the effects of negative weights it could slip up

How do negative weights on graphs impact algorithms. Explain / justify.

Algorithms that do not account for negative weights see them as regular numbers ruining most algorithms that look for shortest possible routes, they will see -2 as being bigger than 1 when in actually it isn't

Illustrated / demonstrate the difference between the two types of collision detection for hash tables.

Chaining uses data structures like linked lists to chain a variable to the previous one in the bucket so they both occupy the space, while open addressing finds an open bucket and allocates the data there

What some useful applications of graphs? Explain.

Graphs are good at showing networks, these are things that are linked to multiple other objects. This can be roads for example, graphs are great at showing the distance and links between cities and be easily used to path a route from one city to another

The minimum spanning tree (MST) exists, would it be harder to find the maximum spanning tree?

Yes, since the MST algorithms are optimized for efficiency the it will be able to find it quickly while the process would need to be revers for the maximum spanning tree

What is the difference between a breadth-first and depth-first search?

breadth: Looks at the graph in order uses a FIFO data structure Will always find a solution Depth: Goes all the way down a branch before trying another Uses a LIFO data structure Can get stuck on an infinite branch


Ensembles d'études connexes

Series 66: Investment Vehicles (Derivatives)

View Set

BIOLOGY - UNIT 4: CELL DIVISION AND REPRODUCTION MEIOSIS

View Set

Chapter 6: Frequent Pattern Mining

View Set

Honda Civic Sedan Touring (Upgrades from EX) Trim Differences

View Set

Strategy and Leadership Exam #2 Review CH. 15, 4-7

View Set

Cardio, Shock, PVD Adult 3 Final

View Set