GRAPHS G=<V,E> Adjacent vertices Undirected graph Directed graph (digraph) Directed edges (arcs) Multigraph Path Cycle Weighted graph Degree of vertex Connected graph
Graph representations adjacency matrix A B C D E 1 A B C D E 1
Graph representations 4 40 20 3 150 200 100 2 60 1 30 10
Graph representations adjacency list A B C D E NULL
Graph representations incidence matrix A 1 B C D E A 1 -1 B C D E
Depth First Search (DFS) Graph Traversals Depth First Search (DFS) A B C F D E F C D E A B L A E F C D B S
Breadth First Search (BFS) Q B A E C D D F L A B E C D F