1

I'm wondering if anyone can help me with this. Say I have a DAG, I understand that it has no directed cycles, but it can have loops ( "diamonds" ). My question is, is there a known way to convert such graph to a directed tree that has no loops. I know of the junction tree/ clique tree way, but this results in an undirected tree after moralization.

I am trying to decompose a DAG type graph to a more tree-like structure. For context the vertices in the graph represents sinks and sources so there can be multiple sources.

Edit: I should've been more clear. To be more concise, I was wondering if there was a way to convert a DAG to a polytree.

T-Tory
  • 19
  • 2

1 Answers1

0

If the undirected version $G'$ of the DAG $G=(V, E)$ is not connected, then there is no polytree that contains all vertices in $V$ and only a subset of the edges in $E$.

If $G'$ is connected, then you can compute any spanning tree $T$ of $G'$ and construct the poly-tree that contains all vertices in $V$ plus all the (directed) edges $(u,v) \in E$ such that the (undirected) edge $\{u,v\}$ is in $T$.

Steven
  • 29,724
  • 2
  • 29
  • 49