max_path for DAG, strongly connected components.