quit() print() G6 = graph6.Graph() visited_counter = 0 print('The nodes of G6 are visited by depth-first-search in this order:') dfs(G6, 1) print() G7 = graph7.Graph() visited_counter = 0 print('The nodes of G7 are visited by depth-first-search in this order:') dfs(G7, 1) print() G8 = graph8.Graph() visited_counter = 0 print('The nodes of G8 are visited by depth-first-search in this order:') dfs(G8, 1) print() G9 = graph9.Graph() visited_counter = 0 print('The nodes of G9 are visited by depth-first-search in this order:') dfs(G9, 1) print() G10 = graph10.Graph() visited_counter = 0 print('The nodes of G10 are visited by depth-first-search in this order:') dfs(G10, 1)
max_distance(G6)) G6 = graph6.Graph() # we initialize again the attributes of the graph G6 print('I found the distance between two random vertices in G6 to be:', random_distance(G6)) print() G7 = graph7.Graph() print( 'The diameter of G7 (i.e. the maximum distance between two vertices) is:', max_distance(G7)) G7 = graph7.Graph() # we initialize again the attributes of the graph G7 print('I found the distance between two random vertices in G7 to be:', random_distance(G7)) print() G8 = graph8.Graph() print( 'The diameter of G8 (i.e. the maximum distance between two vertices) is:', max_distance(G8)) G8 = graph8.Graph() # we initialize again the attributes of the graph G8 print('I found the distance between two random vertices in G8 to be:', random_distance(G8)) print() G9 = graph9.Graph() print( 'The diameter of G9 (i.e. the maximum distance between two vertices) is:', max_distance(G9)) G9 = graph9.Graph() # we initialize again the attributes of the graph G9 print('I found the distance between two random vertices in G9 to be:', random_distance(G9))