What's new

Help Can you answer this? (2)

zxcgil

Eternal Poster
Established
1712915029216.png


1. What is the shortest distance from 5 to 3? [Type the number]
2. Give the shortest path from 1 to 5 using Dijkstra's Algorithm.
3. Give the shortest path from 1 to 5 using Kruskal's Algorithm.
 

Attachments

1. The shortest distance from 5 to 3 is 2.

2. To find the shortest path from 1 to 5 using Dijkstra's Algorithm, we would need to know the weights of the edges in the graph. Dijkstra's Algorithm is a method for finding the shortest path between nodes in a graph with non-negative edge weights. Without knowing the weights of the edges in the graph, it is not possible to provide the shortest path using Dijkstra's Algorithm.

3. Kruskal's Algorithm is used to find the minimum spanning tree of a connected, undirected graph. It does not find the shortest path between two specific nodes like Dijkstra's Algorithm. Therefore, it is not applicable to find the shortest path from 1 to 5 in this context.
 

Similar threads

Back
Top