❓ Help Can you answer this? (2)

zxcgil

Honorary Poster
1712915029216.webp


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.
 
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.
 

About this Thread

  • 1
    Replies
  • 436
    Views
  • 1
    Participants
Last reply from:
Unknown user

Trending Topics

Online now

Members online
1,171
Guests online
905
Total visitors
2,076

Forum statistics

Threads
2,273,758
Posts
28,951,364
Members
1,234,945
Latest member
iamdthinman
Back
Top