Basics of Graph
AI60007
Basic Definitions
Basic Definitions
Basic Definitions: Connectivity
Walk: A🡪B🡪D🡪C🡪B🡪A🡪F
Trail: A🡪B🡪D🡪C🡪A🡪F
Path: A🡪B🡪E🡪D🡪C
Basic Definitions: Connectivity
A
C
Basic Definitions: Connectivity
Subgraph
and
Basic Definitions: Connectivity
Connected Components
At least one path between any pair of nodes
A connected graph has only one component
Basic Definitions: Graph Traversal
Traversing the nodes of the graph depth-wise
Depth First Search (DFS)
0 | | | | | | |
1 | 3 | 4 | 5 | | | |
Visited
Stack
0 | 1 | | | | | |
3 | 4 | 5 | | | | |
Visited
Stack
0 | 1 | 3 | | | | |
2 | 6 | 4 | 5 | | | |
Visited
Stack
0 | 1 | 3 | 2 | | | |
6 | 4 | 5 | | | | |
Visited
Stack
Basic Definitions: Graph Traversal
Traversing the nodes of the graph breadth-wise
Breadth First Search (BFS)
0 | | | | | | |
1 | 3 | 4 | 5 | | | |
Visited
Queue
0 | 1 | | | | | |
3 | 4 | 5 | | | | |
Visited
Queue
0 | 1 | 3 | | | | |
4 | 5 | 2 | 6 | | | |
Visited
Queue
0 | 1 | 3 | 4 | | | |
5 | 2 | 6 | | | | |
Visited
Queue
Graph Isomorphism
Source: Wikipedia
Types of Graphs
Heterogeneous
Types of Graphs
Bipartite
Types of Graphs
Multi-Dimensional
Types of Graph
Signed Graph
Types of Graph
Each node and edges
are associated with timestamp
Dynamic Graph