graph matrix implementation plus DFS and BFS