graph_theory, dp