What edge-set is required to make a non-cyclic directed disconnected graph initial? Is there an algorithm to find the minimum set of edges required from a new node in order to make a disconnected directed graph initial?

Example -

input:

a -&gt; b;
b -&gt; c;
b -&gt; d;
e -&gt; f;
f -&gt; g;




output:

n -&gt; a;
n -&gt; e;




Result:



Thanks!
Assuming that "initial" means connected and having a single source, you can do no better than adding an edge to each source.