Shortest paths and spanning trees in graphs 1 презентация
Содержание
- 2. Shortest paths and spanning trees in graphs Lyzhin Ivan, 2015
- 3. Shortest path problem The problem of finding a path between two
- 4. Dijkstra algorithm There are two sets of vertices – visited and
- 5. Trivial implementation
- 6. Implementation with set
- 7. Implementation with priority queue
- 8. Floyd–Warshall algorithm Initially, dist[u][u]=0 and for each edge (u, v): dist[u][v]=weight(u,
- 9. Implementation
- 10. Bellman–Ford algorithm |V|-1 iterations, on each we try relax distance with
- 11. Implementation
- 12. Minimal spanning tree A spanning tree T of an undirected graph
- 13. Prim’s algorithm Initialize a tree with a single vertex, chosen arbitrarily
- 14. Implementation
- 15. Kruskal’s algorithm Create a forest F (a set of trees), where
- 16. Trivial implementation
- 17. Implementation with DSU
- 18. Disjoint-set-union (DSU) Two main operations: Find(U) – return root of set,
- 19. Implementation
- 20. Path compression When we go up, we can remember root of
- 21. Union by size
- 22. Links https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm https://en.wikipedia.org/wiki/Floyd–Warshall_algorithm https://en.wikipedia.org/wiki/Bellman–Ford_algorithm https://en.wikipedia.org/wiki/Kruskal%27s_algorithm https://en.wikipedia.org/wiki/Prim%27s_algorithm https://en.wikipedia.org/wiki/Disjoint-set_data_structure http://e-maxx.ru/algo/topological_sort
- 23. Home task http://ipc.susu.ac.ru/210-2.html?problem=1903 http://ipc.susu.ac.ru/210-2.html?problem=186 http://acm.timus.ru/problem.aspx?space=1&num=1982 http://acm.timus.ru/problem.aspx?space=1&num=1119 http://acm.timus.ru/problem.aspx?space=1&num=1210 http://acm.timus.ru/problem.aspx?space=1&num=1272
- 24. Скачать презентацию







![Floyd–Warshall algorithm
Initially, dist[u][u]=0 and for each edge (u, v): dist[u][v]=weight(u, Floyd–Warshall algorithm
Initially, dist[u][u]=0 and for each edge (u, v): dist[u][v]=weight(u,](/documents_7/18c580b776fb3605ab47687b9d0a35e3/img7.jpg)














Слайды и текст этой презентации
Скачать презентацию на тему Shortest paths and spanning trees in graphs 1 можно ниже:
Похожие презентации