SlideShare a Scribd company logo
1 of 31
Trees
Department of CSE, MLRITM
Definition
• In non-linear data structure, data is
organized in random order.
• Tree is a very popular data structure used
in wide range of applications.
• Tree is a non-linear data structure which
organizes data in hierarchical structure
and this is a recursive definition.
Department of CSE, MLRITM
Representation of Tree
Department of CSE, MLRITM
• In tree data structure, every individual
element is called as Node.
• Node stores the actual data of that
particular element and link to next
element in hierarchical structure.
• In a tree data structure, if we have N
number of nodes then we can have a
maximum of N-1 number of links.
Department of CSE, MLRITM
Terminology
1. Root
• In a tree data structure, the first node is called
as Root Node.
• Every tree must have root node.
• We can say that root node is the origin of tree
data structure.
• In any tree, there must be only one root node.
Department of CSE, MLRITM
Department of CSE, MLRITM
2. Edge
• In a tree data structure, the connecting
link between any two nodes is called as
EDGE.
• In a tree with 'N' number of nodes there
will be a maximum of 'N-1' number of
edges.
Department of CSE, MLRITM
Department of CSE, MLRITM
3. Parent
• In a tree data structure, the node which is
predecessor of any node is called as PARENT
NODE.
• In simple words, the node which has branch
from it to any other node is called as parent
node.
• Parent node can also be defined as "The node
which has child / children".
Department of CSE, MLRITM
Department of CSE, MLRITM
4. Child
• In a tree data structure, the node which is
descendant of any node is called as CHILD
Node.
• In simple words, the node which has a link
from its parent node is called as child node.
• In a tree, any parent node can have any
number of child nodes. In a tree, all the nodes
except root are child nodes.
Department of CSE, MLRITM
Department of CSE, MLRITM
5. Siblings
• In a tree data structure, nodes which
belong to same Parent are called as
SIBLINGS.
• In simple words, the nodes with same
parent are called as Sibling nodes.
Department of CSE, MLRITM
Department of CSE, MLRITM
6. Leaf
• In a tree data structure, the node which does
not have a child is called as LEAF Node.
• In a tree data structure, the leaf nodes are
also called as External Nodes.
• In a tree, leaf node is also called as 'Terminal'
node.
Department of CSE, MLRITM
Department of CSE, MLRITM
7. Internal Nodes
• In a tree data structure, the node which has
atleast one child is called as INTERNAL Node.
• In a tree data structure, nodes other than leaf
nodes are called as Internal Nodes.
• Internal nodes are also called as 'Non-
Terminal' nodes.
Department of CSE, MLRITM
Department of CSE, MLRITM
8. Degree
• In a tree data structure, the total number of
children of a node is called as DEGREE of that
Node.
• The highest degree of a node among all the
nodes in a tree is called as 'Degree of Tree'
Department of CSE, MLRITM
Department of CSE, MLRITM
9. Level
• In a tree data structure, the root node is said to
be at Level 0 and the children of root node are at
Level 1 and the children of the nodes which are at
Level 1 will be at Level 2 and so on...
• In simple words, in a tree each step from top to
bottom is called as a Level and the Level count
starts with '0' and incremented by one at each
level (Step).
Department of CSE, MLRITM
Department of CSE, MLRITM
10. Height
• The total number of egdes from leaf node to a
particular node in the longest path is called as
HEIGHT of that Node.
• In a tree, height of the root node is said to be
height of the tree.
• In a tree, height of all leaf nodes is '0'.
Department of CSE, MLRITM
Department of CSE, MLRITM
11. Depth
• In a tree data structure, the total number of
edges from root node to a particular node is
called as DEPTH of that Node.
• In a tree, the total number of edges from root
node to a leaf node in the longest path is said
to be Depth of the tree.
• Depth of the root node is '0'.
Department of CSE, MLRITM
Department of CSE, MLRITM
12. Path
• In a tree data structure, the sequence of Nodes and
Edges from one node to another node is called as
PATH between that two Nodes.
• Length of a Path is total number of nodes in that
path.
• In below example the path A - B - E - J has length 4.
Department of CSE, MLRITM
Department of CSE, MLRITM
13. Sub Tree
• In a tree data structure, each child from a
node forms a subtree recursively.
• Every child node will form a subtree on its
parent node.
Department of CSE, MLRITM
Department of CSE, MLRITM
THANK YOU
Department of CSE, MLRITM

More Related Content

Similar to Trees-Terminology.pptx

Tree-introduction ,Definition, Types of BT
Tree-introduction ,Definition, Types of BTTree-introduction ,Definition, Types of BT
Tree-introduction ,Definition, Types of BTVikasNirgude2
 
cppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptxcppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptxShruthiS594607
 
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
 
Search tree,Tree and binary tree and heap tree
Search tree,Tree  and binary tree and heap treeSearch tree,Tree  and binary tree and heap tree
Search tree,Tree and binary tree and heap treezia eagle
 
Tree Introduction.pptx
Tree Introduction.pptxTree Introduction.pptx
Tree Introduction.pptxRahulAI
 
Data structure(Part 2)
Data structure(Part 2)Data structure(Part 2)
Data structure(Part 2)SURBHI SAROHA
 
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
 
Trees in data structures
Trees in data structuresTrees in data structures
Trees in data structuresASairamSairam1
 
Chapter 8: tree data structure
Chapter 8:  tree data structureChapter 8:  tree data structure
Chapter 8: tree data structureMahmoud Alfarra
 
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
 
Discrete Mathematics Tree
Discrete Mathematics  TreeDiscrete Mathematics  Tree
Discrete Mathematics TreeMasud Parvaze
 

Similar to Trees-Terminology.pptx (20)

Tree-introduction ,Definition, Types of BT
Tree-introduction ,Definition, Types of BTTree-introduction ,Definition, Types of BT
Tree-introduction ,Definition, Types of BT
 
cppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptxcppggggggggggggggggggggggggggggggggggggggg.pptx
cppggggggggggggggggggggggggggggggggggggggg.pptx
 
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
 
Search tree,Tree and binary tree and heap tree
Search tree,Tree  and binary tree and heap treeSearch tree,Tree  and binary tree and heap tree
Search tree,Tree and binary tree and heap tree
 
Tree Introduction.pptx
Tree Introduction.pptxTree Introduction.pptx
Tree Introduction.pptx
 
tree in Data Structures
tree in Data Structurestree in Data Structures
tree in Data Structures
 
Data Structures 4
Data Structures 4Data Structures 4
Data Structures 4
 
Data structure(Part 2)
Data structure(Part 2)Data structure(Part 2)
Data structure(Part 2)
 
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
 
Trees in data structures
Trees in data structuresTrees in data structures
Trees in data structures
 
Module - 5_Trees.pdf
Module - 5_Trees.pdfModule - 5_Trees.pdf
Module - 5_Trees.pdf
 
Unit 3 trees
Unit 3   treesUnit 3   trees
Unit 3 trees
 
Chapter 8: tree data structure
Chapter 8:  tree data structureChapter 8:  tree data structure
Chapter 8: tree data structure
 
Trees
TreesTrees
Trees
 
dsa.pptx
dsa.pptxdsa.pptx
dsa.pptx
 
Tree
TreeTree
Tree
 
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
 
Discrete Mathematics Tree
Discrete Mathematics  TreeDiscrete Mathematics  Tree
Discrete Mathematics Tree
 
104333 sri vidhya eng notes
104333 sri vidhya eng notes104333 sri vidhya eng notes
104333 sri vidhya eng notes
 
Lecture 5 trees
Lecture 5 treesLecture 5 trees
Lecture 5 trees
 

Recently uploaded

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfstareducators107
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxCeline George
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfDr Vijay Vishwakarma
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of PlayPooky Knightsmith
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Celine George
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxakanksha16arora
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jisc
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 

Recently uploaded (20)

Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Simple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdfSimple, Complex, and Compound Sentences Exercises.pdf
Simple, Complex, and Compound Sentences Exercises.pdf
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Our Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdfOur Environment Class 10 Science Notes pdf
Our Environment Class 10 Science Notes pdf
 
What is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptxWhat is 3 Way Matching Process in Odoo 17.pptx
What is 3 Way Matching Process in Odoo 17.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Play hard learn harder: The Serious Business of Play
Play hard learn harder:  The Serious Business of PlayPlay hard learn harder:  The Serious Business of Play
Play hard learn harder: The Serious Business of Play
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17Model Attribute _rec_name in the Odoo 17
Model Attribute _rec_name in the Odoo 17
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
PANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptxPANDITA RAMABAI- Indian political thought GENDER.pptx
PANDITA RAMABAI- Indian political thought GENDER.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 

Trees-Terminology.pptx

  • 2. Definition • In non-linear data structure, data is organized in random order. • Tree is a very popular data structure used in wide range of applications. • Tree is a non-linear data structure which organizes data in hierarchical structure and this is a recursive definition. Department of CSE, MLRITM
  • 4. • In tree data structure, every individual element is called as Node. • Node stores the actual data of that particular element and link to next element in hierarchical structure. • In a tree data structure, if we have N number of nodes then we can have a maximum of N-1 number of links. Department of CSE, MLRITM
  • 5. Terminology 1. Root • In a tree data structure, the first node is called as Root Node. • Every tree must have root node. • We can say that root node is the origin of tree data structure. • In any tree, there must be only one root node. Department of CSE, MLRITM
  • 7. 2. Edge • In a tree data structure, the connecting link between any two nodes is called as EDGE. • In a tree with 'N' number of nodes there will be a maximum of 'N-1' number of edges. Department of CSE, MLRITM
  • 9. 3. Parent • In a tree data structure, the node which is predecessor of any node is called as PARENT NODE. • In simple words, the node which has branch from it to any other node is called as parent node. • Parent node can also be defined as "The node which has child / children". Department of CSE, MLRITM
  • 11. 4. Child • In a tree data structure, the node which is descendant of any node is called as CHILD Node. • In simple words, the node which has a link from its parent node is called as child node. • In a tree, any parent node can have any number of child nodes. In a tree, all the nodes except root are child nodes. Department of CSE, MLRITM
  • 13. 5. Siblings • In a tree data structure, nodes which belong to same Parent are called as SIBLINGS. • In simple words, the nodes with same parent are called as Sibling nodes. Department of CSE, MLRITM
  • 15. 6. Leaf • In a tree data structure, the node which does not have a child is called as LEAF Node. • In a tree data structure, the leaf nodes are also called as External Nodes. • In a tree, leaf node is also called as 'Terminal' node. Department of CSE, MLRITM
  • 17. 7. Internal Nodes • In a tree data structure, the node which has atleast one child is called as INTERNAL Node. • In a tree data structure, nodes other than leaf nodes are called as Internal Nodes. • Internal nodes are also called as 'Non- Terminal' nodes. Department of CSE, MLRITM
  • 19. 8. Degree • In a tree data structure, the total number of children of a node is called as DEGREE of that Node. • The highest degree of a node among all the nodes in a tree is called as 'Degree of Tree' Department of CSE, MLRITM
  • 21. 9. Level • In a tree data structure, the root node is said to be at Level 0 and the children of root node are at Level 1 and the children of the nodes which are at Level 1 will be at Level 2 and so on... • In simple words, in a tree each step from top to bottom is called as a Level and the Level count starts with '0' and incremented by one at each level (Step). Department of CSE, MLRITM
  • 23. 10. Height • The total number of egdes from leaf node to a particular node in the longest path is called as HEIGHT of that Node. • In a tree, height of the root node is said to be height of the tree. • In a tree, height of all leaf nodes is '0'. Department of CSE, MLRITM
  • 25. 11. Depth • In a tree data structure, the total number of edges from root node to a particular node is called as DEPTH of that Node. • In a tree, the total number of edges from root node to a leaf node in the longest path is said to be Depth of the tree. • Depth of the root node is '0'. Department of CSE, MLRITM
  • 27. 12. Path • In a tree data structure, the sequence of Nodes and Edges from one node to another node is called as PATH between that two Nodes. • Length of a Path is total number of nodes in that path. • In below example the path A - B - E - J has length 4. Department of CSE, MLRITM
  • 29. 13. Sub Tree • In a tree data structure, each child from a node forms a subtree recursively. • Every child node will form a subtree on its parent node. Department of CSE, MLRITM
  • 31. THANK YOU Department of CSE, MLRITM