BFS-DFS extension

I just solved this problem: https://usaco.guide/gold/bfs#problem-csa-bfsdfs, and I was wondering how could you construct the graph so that it had the minimum number of edges?