Welcome to my prsentation on graph and tree
-
Upload
dyuti-islam -
Category
Data & Analytics
-
view
105 -
download
0
Transcript of Welcome to my prsentation on graph and tree
![Page 1: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/1.jpg)
WELCOME TO MY PRSENTATION ON GRAPH AND TREE
![Page 2: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/2.jpg)
PRESENTED TO MOHAMMAD SAROWAR JAHAN MORSHED,ASST.PROFECEOR, DEPERTMENT OF CSE,DAFFODIL INTERNATINAL UNIVERSITY
PRESENTED BY DYUTI ISLAM ID:151-15-5435
![Page 3: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/3.jpg)
Data StructureThe way of storing data in computer Types of data structure*Linear*Non -linear
![Page 4: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/4.jpg)
Type of data structure
Linear data structure
arrayLinked listsStackqueue
Non-linear data structure
Treegraph
![Page 5: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/5.jpg)
Graph
![Page 6: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/6.jpg)
WHAT IS GRAPH….? ? ? In general –Something written or drawn in a specific way In mathematics-A diagram representing a system of interrelations among two or more things by a number of distinctive dots, lines, bars etc
![Page 7: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/7.jpg)
Graph
![Page 8: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/8.jpg)
But In computer science graphs are different than rest of others
Let’s know more about it….
![Page 9: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/9.jpg)
Graph A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes to each otherThe set of edges describes relationships among the vertices
![Page 10: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/10.jpg)
Node and edges
![Page 11: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/11.jpg)
Formal definition of graphA graph G is defined as follows:
G=(V,E)V(G): a finite, nonempty set of
verticesE(G): a set of edges (pairs of
vertices)
![Page 12: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/12.jpg)
Classification of graph
Undirected graph Directed graph
![Page 13: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/13.jpg)
Classification of graphs
Weighted graph Unweighted graph
![Page 14: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/14.jpg)
Classification of graphs
Cyclic graph
Acyclic graph
C
A
B
![Page 15: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/15.jpg)
Classification of graphs
IN DEGREE OUT DEGREE
![Page 16: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/16.jpg)
Classifications of graph
Directed acyclic graph
![Page 17: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/17.jpg)
Graph coloring
Two adjacent vertices never get the same color
Minimum number of color
![Page 18: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/18.jpg)
Graph coloring
![Page 19: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/19.jpg)
Representation of graph
Adjacency list Adjacency matrix
![Page 20: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/20.jpg)
Graph algorithm
Depth first search
![Page 21: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/21.jpg)
Graph algorithm
Breadth first search
![Page 22: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/22.jpg)
TREE
leaf
branch
root
![Page 23: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/23.jpg)
In Terms of data structuretree is ….
root
leaf
interior
![Page 24: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/24.jpg)
Definition
A tree is a hierarchical representation of a finite set of one or more data item
![Page 25: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/25.jpg)
Root no parentLeaf no childInterior non-leaf
H EIGHt
Tree Terminology
![Page 26: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/26.jpg)
Classification of Tree
Binary tree root can have maximum two children each children is again cab be a binary tree.
![Page 27: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/27.jpg)
Classification of Tree
Strict binary tree root can have exactly twochildren or no children at all.
![Page 28: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/28.jpg)
Classification of Tree
Complete binary tree Mainly strict binary tree every leaf node is at same level.
![Page 29: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/29.jpg)
Tree transversal
Pre-order: (N L R)
![Page 30: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/30.jpg)
Tree transversal
Post order: (L R N)
![Page 31: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/31.jpg)
Tree transversal
In order :(L N R)
![Page 32: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/32.jpg)
Tree transversal
In order (L N R)
![Page 33: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/33.jpg)
RESOURCES
www.google.com.bdwww.mhprofessional.comwww.assignmentpedia.comwww.cs.utexas.eduwww.slideshare.net/bcadvc/data-structure
https://www.wikipedia.orgwww.slideshare.net
![Page 34: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/34.jpg)
Thank you
![Page 35: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/35.jpg)
![Page 36: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/36.jpg)
![Page 37: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/37.jpg)
![Page 38: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/38.jpg)
![Page 39: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/39.jpg)
![Page 40: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/40.jpg)
![Page 41: Welcome to my prsentation on graph and tree](https://reader035.fdocuments.net/reader035/viewer/2022070515/587ab4fe1a28abed218b6d91/html5/thumbnails/41.jpg)