If you have an acyclic directed graph, you will end up with the line graph of the topologically sorted vertices (I used [this generator algorithm][1] for DAGs): vertexCount = 5; edgeCount = 10; elems = RandomSample@PadRight[ConstantArray[1, edgeCount], vertexCount (vertexCount - 1)/2]; adj = Take[FoldList[RotateLeft, elems, Range[0, vertexCount - 2]], All, vertexCount]~LowerTriangularize~-1; g = AdjacencyGraph[adj, DirectedEdges -> True]; new = Graph[Flatten[If[GraphDistance[EdgeDelete[g, #], First@#, Last@#] < \[Infinity], {}, #] & /@ EdgeList@g], VertexLabels -> "Name", ImagePadding -> 10]; {HighlightGraph[g, new, VertexLabels -> "Name", ImagePadding -> 10], new} ![Mathematica graphics](https://i.sstatic.net/pnxZ3.png) Thus it is easier to do it in the following way: Graph[DirectedEdge @@@ Partition[TopologicalSort@g, 2, 1]] [1]: http://mathematica.stackexchange.com/questions/608/how-to-generate-random-directed-acyclic-graphs