[1, 1, 0, 1, 0, 0, 0], [1, 0, 1, 0, 1, 1, 0], [0, 0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 1, 0, 1], [1, 1, 0, 0, 0, 1, 0]] #================================================================== # graph.matrix_adj =[ # [0, 1, 1, 1], # [1, 0, 1, 1], # [1, 1, 0, 1], # [1, 1, 1, 0] # ] graph.list_arc_from_matr_adj() graph.list_adj_from_matix_adj() graph.matrix_incedent_from_matix_adj() graph.add_vert() graph.add_arc(4, 1) graph.show() #graph.greedy_coloring() g.add_edges_from(graph.list_arc) print("DFS") print(graph.DFS(0)) print("BFS") print(bfs(visited, graph.list_adj, 0)) d = graph.greedy_coloring(g) print("coloring by row") coloring_by_manapulating_rows(graph.matrix_adj) print("coloring greedy algo") print("=================================================================") print(d)