SlideShare a Scribd company logo
1 of 19
Title Layout
• Subtitle
Course: CSE131 (Discrete Mathematics)
Course Teacher: Ms. Shadaab Kawnain Bashir (SKB)
Section: P Group: A Depertment: CSE(43 Batch)
Group Members:
01. Md. Ashaf Uddaula (161-15-7473)
02. Alamin Hossain (161-15-7483)
03. Md. Khasrur Rahman (161-15-7214)
04. Ijaz Ahmed Utsa (161-15-7180)
Going to Tell About…….
Definition of Tree
Basic Terminology of Tree
Classification of Tree
M-ary Tree
Full M-ary Tree
Binary Tree
Strictly Binary Tree (SBT)
Complete Binary Tree (CBT)
Almost Binary Tree (ALT)
Ordered Rooted Tree
Decision Tree
Traversing Binary Tree
What is Tree?
• An undirected graph is a tree if
and only if there is a unique simple
path between any two of its
vertices.
• Every Tree is a Graph ,but every
Graph is not a tree.
Basic Terminology of Tree
 Node
 Edge
 Root
 Leaf Node
 Depth
 Height
 Parent
 Children
 Siblings
 Ancestors
 Descendants
 Sub-Tree
Basic Terminology of Tree
Node: A node is a fundamental part of a
tree. Each letter represents one node.
Edge: The arrows from one node to
another are called edges.
Basic Terminology of Tree
Root: The root of the tree is the
only node in the tree that has no
incoming edges.
Here, a is the root.
Leaf Node: A leaf node is a node
that has no children.
The bottom nodes (with no outgoing
edges) are the leaves .
Here, c , i , j , k , l , m are leaves Node.
Basic Terminology of Tree
Depth: Depth tells the number of
steps (nodes) to get from a node back
to the root.
Height: The height of a tree is equal to
the maximum level of any node in the
tree.
This tree has height 5, so the
maximum depth is 4 (height - 1).
Basic Terminology of Tree
Parent:
 a is the parent of b , c , d
 b is the parent of e
 d is the parent of f , g , h
 e is the parent of i , j
 f is the parent of k
 h is the parent of l , m
Siblings:
 b , c , d are siblings of each other
 f , g , h are siblings of each other
 i , j are siblings of each other
 l , m are siblings of each other
Children:
 b , c , d are children of a
 f , g , h are children of d
 e is the children of b
 i , j are the children of e
 k is the children of f
 l , m are the children of h
Basic Terminology of Tree
Basic Terminology of Tree
• Sub-Tree: A sub-tree of a given
node includes one of its children
and all of that child's
descendants.
Classification of Tree
m-ary tree : A rooted tree is
called an m-ary tree if every
internal vertex has no more than
m children.
full m-ary tree :A tree is called a
full m-ary tree if every internal
vertex has exactly m children.
binary tree :An m-ary tree with
m  2 is called a binary tree
Strictly Binary Tree (SBT)
• The tree is said to be strictly binary tree , if every non-leaf node made
in a binary tree has non empty left & right sub-tree.
• A strictly binary tree with n leaves node always contains 2n-1 nodes.
Complete Binary Tree (CBT)
• . A complete binary tree is a binary tree in which every level,
except possibly the last, is completely filled, and all nodes are as
far left as possible.
Almost Binary Tree (ALT)
• An almost complete binary tree is a tree where for a right child,
there is always a left child, but for a left child there may not be a
right child.
Decision Tree
• A decision tree is a decision support tool that uses atree-like graph
or model of decisions and their possible consequences, including
chance event outcomes, resource costs, and utility. It is one way to
display an algorithm.
Traversing Binary Tree
Traversal in Binary Tree
Pre-order
Traversal
In-order
Traversal
Post-order
Traversal
Tree (Data Structure & Discrete Mathematics)

More Related Content

What's hot (20)

non linear data structure -introduction of tree
non linear data structure -introduction of treenon linear data structure -introduction of tree
non linear data structure -introduction of tree
 
AVL Tree
AVL TreeAVL Tree
AVL Tree
 
Avl tree detailed
Avl tree detailedAvl tree detailed
Avl tree detailed
 
Adjacency And Incidence Matrix
Adjacency And Incidence MatrixAdjacency And Incidence Matrix
Adjacency And Incidence Matrix
 
Data Structures - Lecture 10 [Graphs]
Data Structures - Lecture 10 [Graphs]Data Structures - Lecture 10 [Graphs]
Data Structures - Lecture 10 [Graphs]
 
Analysis of algorithm
Analysis of algorithmAnalysis of algorithm
Analysis of algorithm
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Isomorphic graph
Isomorphic graphIsomorphic graph
Isomorphic graph
 
Kruskal & Prim's Algorithm
Kruskal & Prim's AlgorithmKruskal & Prim's Algorithm
Kruskal & Prim's Algorithm
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theory
 
Data structure - Graph
Data structure - GraphData structure - Graph
Data structure - Graph
 
Red black tree
Red black treeRed black tree
Red black tree
 
Unit26 shortest pathalgorithm
Unit26 shortest pathalgorithmUnit26 shortest pathalgorithm
Unit26 shortest pathalgorithm
 
trees in data structure
trees in data structure trees in data structure
trees in data structure
 
graph theory
graph theory graph theory
graph theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Spanning trees
Spanning treesSpanning trees
Spanning trees
 
B trees
B treesB trees
B trees
 
Red black tree
Red black treeRed black tree
Red black tree
 
Graphs In Data Structure
Graphs In Data StructureGraphs In Data Structure
Graphs In Data Structure
 

Viewers also liked (20)

Discrete-Chapter 10 Trees
Discrete-Chapter 10 TreesDiscrete-Chapter 10 Trees
Discrete-Chapter 10 Trees
 
Tree in Discrete structure
Tree in Discrete structureTree in Discrete structure
Tree in Discrete structure
 
Trees (slides)
Trees (slides)Trees (slides)
Trees (slides)
 
Traversals | Data Structures
Traversals | Data StructuresTraversals | Data Structures
Traversals | Data Structures
 
Trees data structure
Trees data structureTrees data structure
Trees data structure
 
Red Black Tree
Red Black TreeRed Black Tree
Red Black Tree
 
THREADED BINARY TREE AND BINARY SEARCH TREE
THREADED BINARY TREE AND BINARY SEARCH TREETHREADED BINARY TREE AND BINARY SEARCH TREE
THREADED BINARY TREE AND BINARY SEARCH TREE
 
Lecture 9 data structures and algorithms
Lecture 9 data structures and algorithmsLecture 9 data structures and algorithms
Lecture 9 data structures and algorithms
 
1.5 binary search tree
1.5 binary search tree1.5 binary search tree
1.5 binary search tree
 
Lecture7 data structure(tree)
Lecture7 data structure(tree)Lecture7 data structure(tree)
Lecture7 data structure(tree)
 
Tree - Data Structure
Tree - Data StructureTree - Data Structure
Tree - Data Structure
 
Tree
TreeTree
Tree
 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
 
Binary Search Algorithm
Binary Search Algorithm Binary Search Algorithm
Binary Search Algorithm
 
The Political History Of Bangladesh
The Political History Of BangladeshThe Political History Of Bangladesh
The Political History Of Bangladesh
 
Tree
TreeTree
Tree
 
Intelligence, spies & espionage
Intelligence, spies & espionageIntelligence, spies & espionage
Intelligence, spies & espionage
 
CITY OF SPIES BY SORAYYA KHAN
CITY OF SPIES BY SORAYYA KHANCITY OF SPIES BY SORAYYA KHAN
CITY OF SPIES BY SORAYYA KHAN
 
Scalable Internet Servers and Load Balancing
Scalable Internet Servers and Load BalancingScalable Internet Servers and Load Balancing
Scalable Internet Servers and Load Balancing
 
Intoduction to Network Security NS1
Intoduction to Network Security NS1Intoduction to Network Security NS1
Intoduction to Network Security NS1
 

Similar to Tree (Data Structure & Discrete Mathematics)

Farhana shaikh webinar_treesindiscretestructure
Farhana shaikh webinar_treesindiscretestructureFarhana shaikh webinar_treesindiscretestructure
Farhana shaikh webinar_treesindiscretestructureFarhana Shaikh
 
TERMINOLOGIES OF TREE, TYPES OF TREE.pptx
TERMINOLOGIES OF TREE, TYPES OF TREE.pptxTERMINOLOGIES OF TREE, TYPES OF TREE.pptx
TERMINOLOGIES OF TREE, TYPES OF TREE.pptxKALPANAC20
 
Introduction to tree ds
Introduction to tree dsIntroduction to tree ds
Introduction to tree dsViji B
 
Lecture 21_Trees - I.pptx
Lecture 21_Trees - I.pptxLecture 21_Trees - I.pptx
Lecture 21_Trees - I.pptxfizzaahmed9
 
Tree Basic concepts of Tree in Data Structure
Tree Basic concepts of Tree in Data StructureTree Basic concepts of Tree in Data Structure
Tree Basic concepts of Tree in Data StructureManoj PAtil
 
Basic Terminologies of Tree and Tree Traversal methods.pptx
Basic Terminologies of Tree and Tree Traversal methods.pptxBasic Terminologies of Tree and Tree Traversal methods.pptx
Basic Terminologies of Tree and Tree Traversal methods.pptx22001003058
 
358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10sumitbardhan
 
Trees and Graphs in data structures and Algorithms
Trees and Graphs in data structures and AlgorithmsTrees and Graphs in data structures and Algorithms
Trees and Graphs in data structures and AlgorithmsBHARATH KUMAR
 
Describe the tree data structure- What is a root node- What is a child.docx
Describe the tree data structure- What is a root node- What is a child.docxDescribe the tree data structure- What is a root node- What is a child.docx
Describe the tree data structure- What is a root node- What is a child.docxandyb37
 
Mca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graphMca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graphRai University
 
unit 4 for trees data structure notes it is
unit 4 for trees data structure notes it isunit 4 for trees data structure notes it is
unit 4 for trees data structure notes it islogesswarisrinivasan
 

Similar to Tree (Data Structure & Discrete Mathematics) (20)

Farhana shaikh webinar_treesindiscretestructure
Farhana shaikh webinar_treesindiscretestructureFarhana shaikh webinar_treesindiscretestructure
Farhana shaikh webinar_treesindiscretestructure
 
TERMINOLOGIES OF TREE, TYPES OF TREE.pptx
TERMINOLOGIES OF TREE, TYPES OF TREE.pptxTERMINOLOGIES OF TREE, TYPES OF TREE.pptx
TERMINOLOGIES OF TREE, TYPES OF TREE.pptx
 
Introduction to tree ds
Introduction to tree dsIntroduction to tree ds
Introduction to tree ds
 
Module - 5_Trees.pdf
Module - 5_Trees.pdfModule - 5_Trees.pdf
Module - 5_Trees.pdf
 
Lecture 21_Trees - I.pptx
Lecture 21_Trees - I.pptxLecture 21_Trees - I.pptx
Lecture 21_Trees - I.pptx
 
Data structures 3
Data structures 3Data structures 3
Data structures 3
 
Tree Basic concepts of Tree in Data Structure
Tree Basic concepts of Tree in Data StructureTree Basic concepts of Tree in Data Structure
Tree Basic concepts of Tree in Data Structure
 
Tree.pptx
Tree.pptxTree.pptx
Tree.pptx
 
Basic Terminologies of Tree and Tree Traversal methods.pptx
Basic Terminologies of Tree and Tree Traversal methods.pptxBasic Terminologies of Tree and Tree Traversal methods.pptx
Basic Terminologies of Tree and Tree Traversal methods.pptx
 
358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10358 33 powerpoint-slides_10-trees_chapter-10
358 33 powerpoint-slides_10-trees_chapter-10
 
Trees and Graphs in data structures and Algorithms
Trees and Graphs in data structures and AlgorithmsTrees and Graphs in data structures and Algorithms
Trees and Graphs in data structures and Algorithms
 
Describe the tree data structure- What is a root node- What is a child.docx
Describe the tree data structure- What is a root node- What is a child.docxDescribe the tree data structure- What is a root node- What is a child.docx
Describe the tree data structure- What is a root node- What is a child.docx
 
Tree
TreeTree
Tree
 
Discrete Mathematics - Trees
Discrete Mathematics - TreesDiscrete Mathematics - Trees
Discrete Mathematics - Trees
 
Chapter 8 ds
Chapter 8 dsChapter 8 ds
Chapter 8 ds
 
Lecture 5 trees
Lecture 5 treesLecture 5 trees
Lecture 5 trees
 
Tree basics
Tree basicsTree basics
Tree basics
 
BINARY TREE
BINARY TREEBINARY TREE
BINARY TREE
 
Mca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graphMca iii dfs u-4 tree and graph
Mca iii dfs u-4 tree and graph
 
unit 4 for trees data structure notes it is
unit 4 for trees data structure notes it isunit 4 for trees data structure notes it is
unit 4 for trees data structure notes it is
 

More from Daffodil International University

Application of numerical integration and differentiation in real life
Application of numerical integration and differentiation in real lifeApplication of numerical integration and differentiation in real life
Application of numerical integration and differentiation in real lifeDaffodil International University
 
AC-Alternative Current & Circuit Analysis ( Full of Information )
AC-Alternative Current & Circuit Analysis ( Full of Information )AC-Alternative Current & Circuit Analysis ( Full of Information )
AC-Alternative Current & Circuit Analysis ( Full of Information )Daffodil International University
 

More from Daffodil International University (16)

Socio-Economic Condition of Sundarbans
Socio-Economic Condition of SundarbansSocio-Economic Condition of Sundarbans
Socio-Economic Condition of Sundarbans
 
Enterprise resource planning software
Enterprise resource planning software Enterprise resource planning software
Enterprise resource planning software
 
Machine learning
Machine learningMachine learning
Machine learning
 
Diabetes
DiabetesDiabetes
Diabetes
 
OSI Reference Model
OSI Reference ModelOSI Reference Model
OSI Reference Model
 
Application of numerical integration and differentiation in real life
Application of numerical integration and differentiation in real lifeApplication of numerical integration and differentiation in real life
Application of numerical integration and differentiation in real life
 
Semiconductor
SemiconductorSemiconductor
Semiconductor
 
Complexity analysis in Algorithms
Complexity analysis in AlgorithmsComplexity analysis in Algorithms
Complexity analysis in Algorithms
 
Statistics and probability
Statistics and probabilityStatistics and probability
Statistics and probability
 
Development & Bangladesh : Achievements & Failures
Development & Bangladesh : Achievements & FailuresDevelopment & Bangladesh : Achievements & Failures
Development & Bangladesh : Achievements & Failures
 
UML Modeling in Java
UML Modeling in JavaUML Modeling in Java
UML Modeling in Java
 
Data Mining (Predict The Future)
Data Mining (Predict The Future)Data Mining (Predict The Future)
Data Mining (Predict The Future)
 
Solar Power
Solar PowerSolar Power
Solar Power
 
AC-Alternative Current & Circuit Analysis ( Full of Information )
AC-Alternative Current & Circuit Analysis ( Full of Information )AC-Alternative Current & Circuit Analysis ( Full of Information )
AC-Alternative Current & Circuit Analysis ( Full of Information )
 
Li-Fi Technology ( Advanced Technology in Future)
Li-Fi Technology ( Advanced Technology in Future)Li-Fi Technology ( Advanced Technology in Future)
Li-Fi Technology ( Advanced Technology in Future)
 
Graph & Heap in Data Structure (Basic Information)
Graph & Heap in Data Structure (Basic Information)Graph & Heap in Data Structure (Basic Information)
Graph & Heap in Data Structure (Basic Information)
 

Recently uploaded

BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationshipsccctableauusergroup
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystSamantha Rae Coolbeth
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...Suhani Kapoor
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 

Recently uploaded (20)

BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships04242024_CCC TUG_Joins and Relationships
04242024_CCC TUG_Joins and Relationships
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
Unveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data AnalystUnveiling Insights: The Role of a Data Analyst
Unveiling Insights: The Role of a Data Analyst
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
VIP High Profile Call Girls Amravati Aarushi 8250192130 Independent Escort Se...
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 

Tree (Data Structure & Discrete Mathematics)

  • 2. Course: CSE131 (Discrete Mathematics) Course Teacher: Ms. Shadaab Kawnain Bashir (SKB) Section: P Group: A Depertment: CSE(43 Batch) Group Members: 01. Md. Ashaf Uddaula (161-15-7473) 02. Alamin Hossain (161-15-7483) 03. Md. Khasrur Rahman (161-15-7214) 04. Ijaz Ahmed Utsa (161-15-7180)
  • 3. Going to Tell About……. Definition of Tree Basic Terminology of Tree Classification of Tree M-ary Tree Full M-ary Tree Binary Tree Strictly Binary Tree (SBT) Complete Binary Tree (CBT) Almost Binary Tree (ALT) Ordered Rooted Tree Decision Tree Traversing Binary Tree
  • 4. What is Tree? • An undirected graph is a tree if and only if there is a unique simple path between any two of its vertices. • Every Tree is a Graph ,but every Graph is not a tree.
  • 5. Basic Terminology of Tree  Node  Edge  Root  Leaf Node  Depth  Height  Parent  Children  Siblings  Ancestors  Descendants  Sub-Tree
  • 6. Basic Terminology of Tree Node: A node is a fundamental part of a tree. Each letter represents one node. Edge: The arrows from one node to another are called edges.
  • 7. Basic Terminology of Tree Root: The root of the tree is the only node in the tree that has no incoming edges. Here, a is the root. Leaf Node: A leaf node is a node that has no children. The bottom nodes (with no outgoing edges) are the leaves . Here, c , i , j , k , l , m are leaves Node.
  • 8. Basic Terminology of Tree Depth: Depth tells the number of steps (nodes) to get from a node back to the root. Height: The height of a tree is equal to the maximum level of any node in the tree. This tree has height 5, so the maximum depth is 4 (height - 1).
  • 9. Basic Terminology of Tree Parent:  a is the parent of b , c , d  b is the parent of e  d is the parent of f , g , h  e is the parent of i , j  f is the parent of k  h is the parent of l , m Siblings:  b , c , d are siblings of each other  f , g , h are siblings of each other  i , j are siblings of each other  l , m are siblings of each other Children:  b , c , d are children of a  f , g , h are children of d  e is the children of b  i , j are the children of e  k is the children of f  l , m are the children of h
  • 11. Basic Terminology of Tree • Sub-Tree: A sub-tree of a given node includes one of its children and all of that child's descendants.
  • 13. m-ary tree : A rooted tree is called an m-ary tree if every internal vertex has no more than m children. full m-ary tree :A tree is called a full m-ary tree if every internal vertex has exactly m children. binary tree :An m-ary tree with m  2 is called a binary tree
  • 14. Strictly Binary Tree (SBT) • The tree is said to be strictly binary tree , if every non-leaf node made in a binary tree has non empty left & right sub-tree. • A strictly binary tree with n leaves node always contains 2n-1 nodes.
  • 15. Complete Binary Tree (CBT) • . A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, and all nodes are as far left as possible.
  • 16. Almost Binary Tree (ALT) • An almost complete binary tree is a tree where for a right child, there is always a left child, but for a left child there may not be a right child.
  • 17. Decision Tree • A decision tree is a decision support tool that uses atree-like graph or model of decisions and their possible consequences, including chance event outcomes, resource costs, and utility. It is one way to display an algorithm.
  • 18. Traversing Binary Tree Traversal in Binary Tree Pre-order Traversal In-order Traversal Post-order Traversal