Building the information for the initial DFS algorithms