 Any directed graph may be made into a DAG by removing a feedback vertex set or a feedback arc set , a set of vertices or edges ( respectively ) that touches all cycles . However , the smallest such set is NP @-@ hard to find . An arbitrary directed graph may also be transformed into a DAG , called its condensation , by contracting each of its strongly connected components into a single supervertex . When the graph is already acyclic , its smallest feedback vertex sets and feedback arc sets are empty , and its condensation is the graph itself . 
 Any directed graph may be made into a DAG by removing a feedback vertex set or a feedback arc set , a set of vertices or edges ( respectively ) <a href='null_relcl' title='1'><mark>that</mark></a><a href='uninflect' title='2'><mark>touches</mark></a> all cycles . However , the smallest such set <a href='drop_aux' title='3'><mark>is</mark></a>NP @-@ hard to find . An arbitrary directed graph may also be transformed into a DAG , called its condensation , by contracting each of its strongly connected components into a single supervertex . When the graph <a href='drop_aux' title='4'><mark>is</mark></a>already acyclic , its smallest feedback vertex sets and feedback arc sets <a href='drop_aux' title='5'><mark>are</mark></a>empty , and its condensation <a href='drop_aux' title='6'><mark>is</mark></a>the graph itself . 
Any directed graph may b made into a DAG by removing a feedback vertex set or a feedback arc set , a set of vertices or edges ( respectively ) touch alll cycles . However , the smallest such set NP @-@ hard to find . An arbitrary directed graph may also bbtransformed into a DAG , called its condensation , by contracting each of its strongly connected components into a single supervertex . When da graph already acyclic , its smallest feedback vertex sets and feedback arc sets empty , and its condensation the graph itself .