is_graph_dag function

Is the graph a directed acyclic graph?