Cluster directed graph into DAG I am looking for an algorithm that clusters a directed graph into a set of clusters that form a directed acyclic graph.

For example, given:
nodes: {A, B, C, D}
with edges: {(A,B), (B,A), (A,C), (C,D), (D,C)}

A valid output would be: {{A,B},{C,D})
An invalid output would be: {{A,C},{B,D}} (since the node edges imply a cycle between the clusters)

Thanks for any pointers or suggestions!
What you are exactly looking for is a modification to the DEDICOM Algorithm (page 4). the DEDICOM itself gives you measure for relation between different components of a directed graph. You just need to be a bit creative to use it for converting a graph into DAG. Read the paper and if further help needed just drop me a comment.