Graph Algorithm
Day 1
Search in Graph
- Depth-First Search
- https://grader.mwit.ac.th/problem/vance
hint
dfs from all node
- https://grader.mwit.ac.th/problem/vance
- Breadth-First Search
- https://grader.mwit.ac.th/problem/toi17_wall
hint
dfs/bfs โจทย์ซับซ้อน
- https://grader.mwit.ac.th/problem/toi17_wall
- Backtracking
- เป็นการเก็บคำตอบย้อนหลัง หลังจากที่เข้าเงื่อนไขบางอย่างแล้ว
- https://grader.mwit.ac.th/problem/walking_bot_2
- Branch and Bound (implementation)
- Challenge
- https://grader.mwit.ac.th/problem/teleport
hint
ad-hoc, implementation
- https://grader.mwit.ac.th/problem/teleport
Paths and circuits
- Eulerian
- Hamiltonian
Applications
- Colorings
- Connectivity check
- Finding cycles visualgo
- Bipartiteness check
Day 2
Weighted Shortest Path- Dijkstra’s Algorithm (implementation)
- https://grader.mwit.ac.th/problem/turboprogramming
hint
dijkstra ตรงๆ - https://grader.mwit.ac.th/problem/town
hint
dijsktra ไม่ตรงมาก - https://grader.mwit.ac.th/problem/followpeatt
hint
dijkstra แบบมีเงื่อนไข - https://grader.mwit.ac.th/problem/toi14_logistics
hint
dijkstra ซับซ้อนขึ้น
- https://grader.mwit.ac.th/problem/turboprogramming
- Bellman-Ford
- Negative cycles
- Floyd-Warshall (implementation)
- https://grader.mwit.ac.th/problem/toi17_1221
hint
all-pair
- https://grader.mwit.ac.th/problem/toi17_1221
- Johnson (exist)
- A* Search
Minimum Spanning Tree
- Kruskal’s (implementation)
- Union-find
- https://grader.mwit.ac.th/problem/mst
hint
ตรงสุดๆ
- Prim’s
Recap Graph Day 2
Day 3
Tree algorithms- Diameter
- Lowest common ancestor (implementation)
- Euler Tour Technique
- https://grader.mwit.ac.th/problem/toi12_weakpoint
hint
one-cycle, dp?
Topological sorting (implementation) Strong connectivity
- Kosaraju’s
- Challenge
- https://grader.mwit.ac.th/problem/walk_around
hint
cycle, union find, reverse query
- https://grader.mwit.ac.th/problem/walk_around
เพิ่มเติม
- Principles of Algorithmic Problem Solving
- Competitive Programmer’s Handbook
- Algorithms for Competitive Programming
- ตะลุยโจทย์ Graph ระดับโหดใน Competitive Programming (aquablitz11) ตะลุยโจทย์ Graph ระดับโหดใน Competitive Programming
- การบรรยายวิชา การออกแบบและวิเคราะห์อัลกอริทึม โดย สมชาย ประสิทธิ์จูตระกูล
- อัลกอริทึม : 6.1 กราฟ - นิยามและการใช้งาน
- อัลกอริทึม : 6.2 กราฟ - การแทนกราฟ
- อัลกอริทึม : 6.3 กราฟ - การค้นตามแนวกว้าง
- อัลกอริทึม : 6.4 กราฟ - การค้นตามแนวลึก
- อัลกอริทึม : 6.5 กราฟ - การเรียงลำดับทอพอโลยี
- อัลกอริทึม : 6.6 กราฟ - การเชื่อมต่อแบบเข้ม
- อัลกอริทึม : 6.7 กราฟ - Prim : ต้นไม้แบบทอดข้ามต่ำสุด
- อัลกอริทึม : 6.8 กราฟ - Kruskal : ต้นไม้แบบทอดข้ามต่ำสุด
- อัลกอริทึม : 6.9 กราฟ - Dijkstra : วิถีสั้นสุดแหล่งต้นทางเดี่ยว
- อัลกอริทึม : 6.10 กราฟ - Bellman-Ford : วิถีสั้นสุดแหล่งต้นทางเดี่ยว
- อัลกอริทึม : 6.11 กราฟ - Floyd-Warshall : วิถีสั้นสุดของทุกคู่ปม
- อัลกอริทึม : 6.12 กราฟ - Johnson : วิถีสั้นสุดของทุกคู่ปม