Phase 2 / dp, coloring, grid
Phase 6 / dp/greedy
Phase 5 / dp, coloring, min cost
Phase 6 / graph decomposition, coloring, matching
Phase 5 / bfs, multi-state_shortest
Phase 3 / graph-components