














Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
An overview of two popular algorithms for finding the shortest path in a weighted graph: dijkstra's algorithm and floyd's algorithm. Dijkstra's algorithm is used to find the shortest path from a single source vertex to all other vertices in the graph, while floyd's algorithm is used to find the shortest paths between all pairs of vertices. The step-by-step implementation of these algorithms, including the initialization, update, and termination steps. It also includes several examples to illustrate the application of these algorithms on sample graphs. Key concepts such as the distance function, predecessor function, and the construction of the shortest path tree or matrix. This comprehensive coverage of the dijkstra and floyd algorithms makes this document a valuable resource for students and professionals studying graph theory, algorithms, and optimization.
Typology: Cheat Sheet
1 / 22
This page cannot be seen from the preview
Don't miss anything!
Thuật toán DIJKSTRA.
Thuật toán FLOYD.
Nội dung
Xét đồ thị có hướng có trọng số liên thông G = (V, E). Bài
toán đặt ra là tìm đường đi ngắn nhất (tổng trọng số nhỏ
nhất) giữa 2 đỉnh bất kỳ cho trước.
Trọng số cạnh = ký hiệu là ( )
Ma trận trọng số được xác định như sau: