graphs
TRANSCRIPT
![Page 1: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/1.jpg)
GraphsFariha Tasmin JaigirdarAssistant ProfessorDaffodil International University
![Page 2: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/2.jpg)
Graphs
![Page 3: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/3.jpg)
Graphs
![Page 4: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/4.jpg)
Directed Graph
![Page 5: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/5.jpg)
Directed Graph Cont.
![Page 6: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/6.jpg)
Directed Graph Cont.
![Page 7: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/7.jpg)
Undirected Graph
![Page 8: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/8.jpg)
Undirected Graph cont.
![Page 9: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/9.jpg)
Sub-graph
![Page 10: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/10.jpg)
Weighted Graph
![Page 11: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/11.jpg)
Weighted Graph cont.
![Page 12: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/12.jpg)
Complete/Strongly/Fully Connected Graph
![Page 13: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/13.jpg)
REPRESENTATION OF GRAPH
Graph is a mathematical structure and finds its application is many areas, where the problem is to be solved by computers. The problems related to graph G must be represented in computer memory using any suitable data structure to solve the same. There are two standard ways of maintaining a graph G in the memory of a computer.
1. Sequential representation of a graph using adjacent 2. Linked representation of a graph using linked list
![Page 14: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/14.jpg)
ADJACENCY MATRIX REPRESENTATION Directed Graph
Let us see how a directed graph can be represented using adjacency matrix. The A of a graph G = (V, E) with n vertices, is an n x n matrix. Considered a directed graph in Fig. 9.12 where all the vertices are numbered, (1, 2, 3, 4...... etc.)
![Page 15: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/15.jpg)
ADJACENCY MATRIX REPRESENTATION Directed Graph cont.The adjacency matrix A of a directed graph G = (V, E) can be represented (in Fig 9.13) with the following conditions
![Page 16: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/16.jpg)
ADJACENCY MATRIX REPRESENTATION Undirected GraphWe have seen how a directed graph can be represented in adjacency matrix. Now let us discuss how an undirected graph can be represented using adjacency matrix. The adjacency matrix A of an undirected graph G = (V, E) can be represented (in Fig 9.15) with the following conditions
![Page 17: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/17.jpg)
ADJACENCY MATRIX REPRESENTATION Weighted Graph
![Page 18: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/18.jpg)
ADJACENCY MATRIX REPRESENTATION Weighted Graph cont.
![Page 19: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/19.jpg)
LINKED LIST REPRESENTATIONDirected Graph
![Page 20: Graphs](https://reader033.vdocuments.us/reader033/viewer/2022052705/58aeb02b1a28ab00708b4fe3/html5/thumbnails/20.jpg)
LINKED LIST REPRESENTATIONDirected Graph