Download - Welcome to my prsentation on graph and tree
WELCOME TO MY PRSENTATION ON GRAPH AND TREE
PRESENTED TO MOHAMMAD SAROWAR JAHAN MORSHED,ASST.PROFECEOR, DEPERTMENT OF CSE,DAFFODIL INTERNATINAL UNIVERSITY
PRESENTED BY DYUTI ISLAM ID:151-15-5435
Data StructureThe way of storing data in computer Types of data structure*Linear*Non -linear
Type of data structure
Linear data structure
arrayLinked listsStackqueue
Non-linear data structure
Treegraph
Graph
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
Graph
But In computer science graphs are different than rest of others
Let’s know more about it….
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
Node and edges
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)
Classification of graph
Undirected graph Directed graph
Classification of graphs
Weighted graph Unweighted graph
Classification of graphs
Cyclic graph
Acyclic graph
C
A
B
Classification of graphs
IN DEGREE OUT DEGREE
Classifications of graph
Directed acyclic graph
Graph coloring
Two adjacent vertices never get the same color
Minimum number of color
Graph coloring
Representation of graph
Adjacency list Adjacency matrix
Graph algorithm
Depth first search
Graph algorithm
Breadth first search
TREE
leaf
branch
root
In Terms of data structuretree is ….
root
leaf
interior
Definition
A tree is a hierarchical representation of a finite set of one or more data item
Root no parentLeaf no childInterior non-leaf
H EIGHt
Tree Terminology
Classification of Tree
Binary tree root can have maximum two children each children is again cab be a binary tree.
Classification of Tree
Strict binary tree root can have exactly twochildren or no children at all.
Classification of Tree
Complete binary tree Mainly strict binary tree every leaf node is at same level.
Tree transversal
Pre-order: (N L R)
Tree transversal
Post order: (L R N)
Tree transversal
In order :(L N R)
Tree transversal
In order (L N R)
RESOURCES
www.google.com.bdwww.mhprofessional.comwww.assignmentpedia.comwww.cs.utexas.eduwww.slideshare.net/bcadvc/data-structure
https://www.wikipedia.orgwww.slideshare.net
Thank you