How to compress SCC and form a DAG?

Can anybody help me to know all the techniques by which we can compress SCC into single node and a form DAG.

we can form the SCC by using the kosaraju’s algorithm and once we find all the SCC’s ,
then iterate over all the edges of the graph and if both the vertex of any edge falls in the same SCC then ignore this edge else consider that edge .
The resulting graph will be DAG .

2 Likes