convert any non DAG into DAG (Directed acyclic graphs)

1k Views Asked by At

It is always possible to convert any non DAG into a DAG, by changing its order, if not limiting the number of changes. Is this true?

Is there a proof?

[Newly Updated/Edited for exact definitions]

Non DAG is a directed graph with directed cycles.

Since a directed graph $G=(E,V)$ is a graph associated with ordered pairs. By changing its order, I mean for any directed edge $e_{i\to j} \in V$, one may change it to $e_{j\to i}$. That is, given a directed graph $G=(E,V)$ which is not a DAG, if there always exists a DAG $G'=(E,V')$ for which $$e_{i\to j} \in V' \,\textrm{ if and only if }\, e_{i\to j} \textrm{ or } e_{j\to i}\in V.$$

1

There are 1 best solutions below

4
On BEST ANSWER

You can always* turn $G=(V, E)$ into a DAG. To do this, number the vertices of $G$ from $1$ to $|V|$, and redirect each edge so that it points from a lower numbered vertex to a higher numbered vertex.


*The only way this could fail is there existed two vertices $v,w$ in $G$ such that both of the edges $v\to w$ and $w\to v$ are present in $G$. Applying my procedure, the resulted graph would have a doubled edge, so would not be simple. Different authors disagree as to whether a $G$ with two such opposing edges counts as a simple directed graph.