welcome to my prsentation on graph and tree

41
WELCOME TO MY PRSENTATION ON GRAPH AND TREE

Upload: dyuti-islam

Post on 15-Jan-2017

104 views

Category:

Data & Analytics


0 download

TRANSCRIPT

Page 1: Welcome to my prsentation on graph and tree

WELCOME TO MY PRSENTATION ON GRAPH AND TREE

Page 2: 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

Page 3: Welcome to my prsentation on graph and tree

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

Type of data structure

Linear data structure

arrayLinked listsStackqueue

Non-linear data structure

Treegraph

Page 5: Welcome to my prsentation on graph and tree

Graph

Page 6: Welcome to my prsentation on graph and tree

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

Graph

Page 8: Welcome to my prsentation on graph and tree

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

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

Node and edges

Page 11: Welcome to my prsentation on graph and tree

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

Classification of graph

Undirected graph Directed graph

Page 13: Welcome to my prsentation on graph and tree

Classification of graphs

Weighted graph Unweighted graph

Page 14: Welcome to my prsentation on graph and tree

Classification of graphs

Cyclic graph

Acyclic graph

C

A

B

Page 15: Welcome to my prsentation on graph and tree

Classification of graphs

IN DEGREE OUT DEGREE

Page 16: Welcome to my prsentation on graph and tree

Classifications of graph

Directed acyclic graph

Page 17: Welcome to my prsentation on graph and tree

Graph coloring

Two adjacent vertices never get the same color

Minimum number of color

Page 18: Welcome to my prsentation on graph and tree

Graph coloring

Page 19: Welcome to my prsentation on graph and tree

Representation of graph

Adjacency list Adjacency matrix

Page 20: Welcome to my prsentation on graph and tree

Graph algorithm

Depth first search

Page 21: Welcome to my prsentation on graph and tree

Graph algorithm

Breadth first search

Page 22: Welcome to my prsentation on graph and tree

TREE

leaf

branch

root

Page 23: Welcome to my prsentation on graph and tree

In Terms of data structuretree is ….

root

leaf

interior

Page 24: Welcome to my prsentation on graph and tree

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

Root no parentLeaf no childInterior non-leaf

H EIGHt

Tree Terminology

Page 26: Welcome to my prsentation on graph and tree

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

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

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

Tree transversal

Pre-order: (N L R)

Page 30: Welcome to my prsentation on graph and tree

Tree transversal

Post order: (L R N)

Page 31: Welcome to my prsentation on graph and tree

Tree transversal

In order :(L N R)

Page 32: Welcome to my prsentation on graph and tree

Tree transversal

In order (L N R)

Page 34: Welcome to my prsentation on graph and tree

Thank you

Page 35: Welcome to my prsentation on graph and tree
Page 36: Welcome to my prsentation on graph and tree
Page 37: Welcome to my prsentation on graph and tree
Page 38: Welcome to my prsentation on graph and tree
Page 39: Welcome to my prsentation on graph and tree
Page 40: Welcome to my prsentation on graph and tree
Page 41: Welcome to my prsentation on graph and tree