SlideShare a Scribd company logo
1 of 7
Download to read offline
Rooted & Binary Tree
Dr. Manish T I
Associate Professor
Dept of CSE
Adi Shankara Institute of Engineering & Technology, Kalady
manish.cs@adishankara.ac.in
β€’ A Binary tree is defined as a tree in which there is
exactly one vertex of degree two, and each of the
remaining vertices is of degree one or three.
Introduction
β€’ A Tree in which one vertex is distinguished from
all the others is called a Rooted tree
β€’ A special class of rooted trees called Binary Rooted
trees.
VERTICES
a - Internal vertex
b - Pendant vertex
c- Internal vertex
d - Pendant vertex
e- Internal vertexe- Internal vertex
f - Pendant vertex
g - Pendant vertex
EDGES
1,2,3,4,5,6
Properties of Binary Tree
The number of vertices n in a binary tree is always odd.
n No: of Vertices in binary tree
p=(n+1)/2 No: of Pendant vertices in binary tree.
n-p-1 Number of vertices with degree three.
n-1 Number of edges .
p-1 Number of internal vertices in binary tree.
Properties of Binary Tree
From the previous diagram n=7 i.e. a odd number
Number of edges = 7-1 =6
No: of Pendant vertices in binary tree = (7+1)/2 =4
No: of vertices with degree three = 7-4-1 =2No: of vertices with degree three = 7-4-1 =2
Number of edges = 7-1 =6
Number of internal vertices in binary tree = 4-1 =3
Properties of Binary Tree
2k
Maximum number of vertices possible in k-level binary tree.
⌈ log2
(n+1) -1 βŒ‰ Minimum possible height of an n – vertex binary tree.⌈ βŒ‰
(n-1)/2 Maximum possible height of an n – vertex binary tree.
Properties of Binary Tree
From the previous diagram k=4
Max No: of vertices possible in k-level binary tree = 24
= 16
⌈⌈⌈⌈ βŒ‰βŒ‰βŒ‰βŒ‰Min possible height of an 7 – vertex binary tree = ⌈⌈⌈⌈ log2 (7+1) -1 βŒ‰βŒ‰βŒ‰βŒ‰
= ⌈⌈⌈⌈ log2 (8) -1 βŒ‰βŒ‰βŒ‰βŒ‰ = ⌈⌈⌈⌈ 3 -1 βŒ‰βŒ‰βŒ‰βŒ‰ = 2
Max possible height of an 7 – vertex binary tree = (7-1)/2 = 4

More Related Content

What's hot

Terminology of tree
Terminology of treeTerminology of tree
Terminology of treeRacksaviR
Β 
Graph Theory
Graph TheoryGraph Theory
Graph TheoryEhsan Hamzei
Β 
10.m way search tree
10.m way search tree10.m way search tree
10.m way search treeChandan Singh
Β 
Graphs bfs dfs
Graphs bfs dfsGraphs bfs dfs
Graphs bfs dfsJaya Gautam
Β 
Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree Divya Ks
Β 
Polish Notation In Data Structure
Polish Notation In Data StructurePolish Notation In Data Structure
Polish Notation In Data StructureMeghaj Mallick
Β 
Vector space
Vector spaceVector space
Vector spaceJaimin Patel
Β 
Threaded binary tree
Threaded binary treeThreaded binary tree
Threaded binary treeArunaP47
Β 
Binary tree
Binary tree Binary tree
Binary tree Rajendran
Β 
Trees data structure
Trees data structureTrees data structure
Trees data structureSumit Gupta
Β 
Tree and binary tree
Tree and binary treeTree and binary tree
Tree and binary treeZaid Shabbir
Β 
minimum spanning trees Algorithm
minimum spanning trees Algorithm minimum spanning trees Algorithm
minimum spanning trees Algorithm sachin varun
Β 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principlenielsoli
Β 
CMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of RelationsCMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of Relationsallyn joy calcaben
Β 
Ch 2 lattice & boolean algebra
Ch 2 lattice & boolean algebraCh 2 lattice & boolean algebra
Ch 2 lattice & boolean algebraRupali Rana
Β 
Heaps
HeapsHeaps
Heapspratmash
Β 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary treeKrish_ver2
Β 

What's hot (20)

Threaded Binary Tree.pptx
Threaded Binary Tree.pptxThreaded Binary Tree.pptx
Threaded Binary Tree.pptx
Β 
Terminology of tree
Terminology of treeTerminology of tree
Terminology of tree
Β 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
Β 
10.m way search tree
10.m way search tree10.m way search tree
10.m way search tree
Β 
Graphs bfs dfs
Graphs bfs dfsGraphs bfs dfs
Graphs bfs dfs
Β 
Lecture optimal binary search tree
Lecture optimal binary search tree Lecture optimal binary search tree
Lecture optimal binary search tree
Β 
Polish Notation In Data Structure
Polish Notation In Data StructurePolish Notation In Data Structure
Polish Notation In Data Structure
Β 
Vector space
Vector spaceVector space
Vector space
Β 
Threaded binary tree
Threaded binary treeThreaded binary tree
Threaded binary tree
Β 
Huffman Encoding Pr
Huffman Encoding PrHuffman Encoding Pr
Huffman Encoding Pr
Β 
Binary tree
Binary tree Binary tree
Binary tree
Β 
Trees data structure
Trees data structureTrees data structure
Trees data structure
Β 
Tree and binary tree
Tree and binary treeTree and binary tree
Tree and binary tree
Β 
minimum spanning trees Algorithm
minimum spanning trees Algorithm minimum spanning trees Algorithm
minimum spanning trees Algorithm
Β 
Pigeonhole Principle
Pigeonhole PrinciplePigeonhole Principle
Pigeonhole Principle
Β 
CMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of RelationsCMSC 56 | Lecture 15: Closures of Relations
CMSC 56 | Lecture 15: Closures of Relations
Β 
B+ Tree
B+ TreeB+ Tree
B+ Tree
Β 
Ch 2 lattice & boolean algebra
Ch 2 lattice & boolean algebraCh 2 lattice & boolean algebra
Ch 2 lattice & boolean algebra
Β 
Heaps
HeapsHeaps
Heaps
Β 
1.1 binary tree
1.1 binary tree1.1 binary tree
1.1 binary tree
Β 

Similar to Rooted & binary tree

DSA IV Unit.pptx
DSA IV Unit.pptxDSA IV Unit.pptx
DSA IV Unit.pptxAyeshaTakreem1
Β 
Binary Trees
Binary TreesBinary Trees
Binary TreesSadaf Ismail
Β 
Chapter 5_Trees.pdf
Chapter 5_Trees.pdfChapter 5_Trees.pdf
Chapter 5_Trees.pdfssuser50179b
Β 
Unit iii(dsc++)
Unit iii(dsc++)Unit iii(dsc++)
Unit iii(dsc++)Durga Devi
Β 
Review session2
Review session2Review session2
Review session2NEEDY12345
Β 
Lecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsLecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsAakash deep Singhal
Β 
Lecture 10.pptx
Lecture 10.pptxLecture 10.pptx
Lecture 10.pptxSamiAAli44
Β 
tutorial-tree (3).ppt
tutorial-tree (3).ppttutorial-tree (3).ppt
tutorial-tree (3).pptSrinivasanCSE
Β 
Trees in Data Structure
Trees in Data StructureTrees in Data Structure
Trees in Data StructureOm Prakash
Β 
B.TECH Math project
B.TECH Math projectB.TECH Math project
B.TECH Math projectarunsarkar9
Β 
Chapter 8 ds
Chapter 8 dsChapter 8 ds
Chapter 8 dsHanif Durad
Β 
Unit 4.1 (tree)
Unit 4.1 (tree)Unit 4.1 (tree)
Unit 4.1 (tree)DurgaDeviCbit
Β 
part4-trees.ppt
part4-trees.pptpart4-trees.ppt
part4-trees.pptSuneel61
Β 

Similar to Rooted & binary tree (20)

DSA IV Unit.pptx
DSA IV Unit.pptxDSA IV Unit.pptx
DSA IV Unit.pptx
Β 
Binary Trees
Binary TreesBinary Trees
Binary Trees
Β 
Tree
TreeTree
Tree
Β 
Lec6
Lec6Lec6
Lec6
Β 
7.tree
7.tree7.tree
7.tree
Β 
Chapter 5_Trees.pdf
Chapter 5_Trees.pdfChapter 5_Trees.pdf
Chapter 5_Trees.pdf
Β 
Unit iii(dsc++)
Unit iii(dsc++)Unit iii(dsc++)
Unit iii(dsc++)
Β 
Review session2
Review session2Review session2
Review session2
Β 
Lecture 8 data structures and algorithms
Lecture 8 data structures and algorithmsLecture 8 data structures and algorithms
Lecture 8 data structures and algorithms
Β 
Tree
TreeTree
Tree
Β 
Unit 6 tree
Unit   6 treeUnit   6 tree
Unit 6 tree
Β 
Lecture 10.pptx
Lecture 10.pptxLecture 10.pptx
Lecture 10.pptx
Β 
tutorial-tree (3).ppt
tutorial-tree (3).ppttutorial-tree (3).ppt
tutorial-tree (3).ppt
Β 
Trees in Data Structure
Trees in Data StructureTrees in Data Structure
Trees in Data Structure
Β 
B.TECH Math project
B.TECH Math projectB.TECH Math project
B.TECH Math project
Β 
Chap 5 Tree.ppt
Chap 5 Tree.pptChap 5 Tree.ppt
Chap 5 Tree.ppt
Β 
Chapter 8 ds
Chapter 8 dsChapter 8 ds
Chapter 8 ds
Β 
Lec20
Lec20Lec20
Lec20
Β 
Unit 4.1 (tree)
Unit 4.1 (tree)Unit 4.1 (tree)
Unit 4.1 (tree)
Β 
part4-trees.ppt
part4-trees.pptpart4-trees.ppt
part4-trees.ppt
Β 

More from MANISH T I

Budgerigar
BudgerigarBudgerigar
BudgerigarMANISH T I
Β 
NAAC Criteria 3
NAAC  Criteria 3NAAC  Criteria 3
NAAC Criteria 3MANISH T I
Β 
Artificial intelligence - An Overview
Artificial intelligence - An OverviewArtificial intelligence - An Overview
Artificial intelligence - An OverviewMANISH T I
Β 
The future of blogging
The future of bloggingThe future of blogging
The future of bloggingMANISH T I
Β 
Socrates - Most Important of his Thoughts
Socrates - Most Important of his ThoughtsSocrates - Most Important of his Thoughts
Socrates - Most Important of his ThoughtsMANISH T I
Β 
Technical writing
Technical writingTechnical writing
Technical writingMANISH T I
Β 
Shannon-Fano algorithm
Shannon-Fano algorithmShannon-Fano algorithm
Shannon-Fano algorithmMANISH T I
Β 
Solar Image Processing
Solar Image Processing  Solar Image Processing
Solar Image Processing MANISH T I
Β 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory IntroductionMANISH T I
Β 
Colourful Living - Way of Life
Colourful Living - Way of LifeColourful Living - Way of Life
Colourful Living - Way of LifeMANISH T I
Β 
Introduction to Multimedia
Introduction to MultimediaIntroduction to Multimedia
Introduction to MultimediaMANISH T I
Β 
Soft Computing
Soft ComputingSoft Computing
Soft ComputingMANISH T I
Β 
Research Methodology - Methods of data collection
 Research Methodology - Methods of data collection Research Methodology - Methods of data collection
Research Methodology - Methods of data collectionMANISH T I
Β 
15 lessons of lord buddha
15 lessons of lord buddha15 lessons of lord buddha
15 lessons of lord buddhaMANISH T I
Β 
Image enhancement
Image enhancementImage enhancement
Image enhancementMANISH T I
Β 
Research Methodology - Introduction
Research  Methodology - IntroductionResearch  Methodology - Introduction
Research Methodology - IntroductionMANISH T I
Β 
DBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORMDBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORMMANISH T I
Β 
Simple Dictionary Compression
Simple Dictionary CompressionSimple Dictionary Compression
Simple Dictionary CompressionMANISH T I
Β 
Data Compression - Text Compression - Run Length Encoding
Data Compression - Text Compression - Run Length EncodingData Compression - Text Compression - Run Length Encoding
Data Compression - Text Compression - Run Length EncodingMANISH T I
Β 

More from MANISH T I (20)

Budgerigar
BudgerigarBudgerigar
Budgerigar
Β 
NAAC Criteria 3
NAAC  Criteria 3NAAC  Criteria 3
NAAC Criteria 3
Β 
Artificial intelligence - An Overview
Artificial intelligence - An OverviewArtificial intelligence - An Overview
Artificial intelligence - An Overview
Β 
The future of blogging
The future of bloggingThe future of blogging
The future of blogging
Β 
Socrates - Most Important of his Thoughts
Socrates - Most Important of his ThoughtsSocrates - Most Important of his Thoughts
Socrates - Most Important of his Thoughts
Β 
Technical writing
Technical writingTechnical writing
Technical writing
Β 
Shannon-Fano algorithm
Shannon-Fano algorithmShannon-Fano algorithm
Shannon-Fano algorithm
Β 
Solar Image Processing
Solar Image Processing  Solar Image Processing
Solar Image Processing
Β 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
Β 
JPEG
JPEGJPEG
JPEG
Β 
Colourful Living - Way of Life
Colourful Living - Way of LifeColourful Living - Way of Life
Colourful Living - Way of Life
Β 
Introduction to Multimedia
Introduction to MultimediaIntroduction to Multimedia
Introduction to Multimedia
Β 
Soft Computing
Soft ComputingSoft Computing
Soft Computing
Β 
Research Methodology - Methods of data collection
 Research Methodology - Methods of data collection Research Methodology - Methods of data collection
Research Methodology - Methods of data collection
Β 
15 lessons of lord buddha
15 lessons of lord buddha15 lessons of lord buddha
15 lessons of lord buddha
Β 
Image enhancement
Image enhancementImage enhancement
Image enhancement
Β 
Research Methodology - Introduction
Research  Methodology - IntroductionResearch  Methodology - Introduction
Research Methodology - Introduction
Β 
DBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORMDBMS - FIRST NORMAL FORM
DBMS - FIRST NORMAL FORM
Β 
Simple Dictionary Compression
Simple Dictionary CompressionSimple Dictionary Compression
Simple Dictionary Compression
Β 
Data Compression - Text Compression - Run Length Encoding
Data Compression - Text Compression - Run Length EncodingData Compression - Text Compression - Run Length Encoding
Data Compression - Text Compression - Run Length Encoding
Β 

Recently uploaded

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
Β 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
Β 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
Β 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
Β 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
Β 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
Β 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
Β 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
Β 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
Β 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
Β 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
Β 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
Β 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
Β 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
Β 

Recently uploaded (20)

Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
Β 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
Β 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Β 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
Β 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
Β 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
Β 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
Β 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
Β 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
Β 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
Β 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
Β 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
Β 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
Β 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
Β 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
Β 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Β 
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Β 
Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"Rapple "Scholarly Communications and the Sustainable Development Goals"
Rapple "Scholarly Communications and the Sustainable Development Goals"
Β 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
Β 
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Model Call Girl in Tilak Nagar Delhi reach out to us at πŸ”9953056974πŸ”
Β 

Rooted & binary tree

  • 1. Rooted & Binary Tree Dr. Manish T I Associate Professor Dept of CSE Adi Shankara Institute of Engineering & Technology, Kalady manish.cs@adishankara.ac.in
  • 2. β€’ A Binary tree is defined as a tree in which there is exactly one vertex of degree two, and each of the remaining vertices is of degree one or three. Introduction β€’ A Tree in which one vertex is distinguished from all the others is called a Rooted tree β€’ A special class of rooted trees called Binary Rooted trees.
  • 3. VERTICES a - Internal vertex b - Pendant vertex c- Internal vertex d - Pendant vertex e- Internal vertexe- Internal vertex f - Pendant vertex g - Pendant vertex EDGES 1,2,3,4,5,6
  • 4. Properties of Binary Tree The number of vertices n in a binary tree is always odd. n No: of Vertices in binary tree p=(n+1)/2 No: of Pendant vertices in binary tree. n-p-1 Number of vertices with degree three. n-1 Number of edges . p-1 Number of internal vertices in binary tree.
  • 5. Properties of Binary Tree From the previous diagram n=7 i.e. a odd number Number of edges = 7-1 =6 No: of Pendant vertices in binary tree = (7+1)/2 =4 No: of vertices with degree three = 7-4-1 =2No: of vertices with degree three = 7-4-1 =2 Number of edges = 7-1 =6 Number of internal vertices in binary tree = 4-1 =3
  • 6. Properties of Binary Tree 2k Maximum number of vertices possible in k-level binary tree. ⌈ log2 (n+1) -1 βŒ‰ Minimum possible height of an n – vertex binary tree.⌈ βŒ‰ (n-1)/2 Maximum possible height of an n – vertex binary tree.
  • 7. Properties of Binary Tree From the previous diagram k=4 Max No: of vertices possible in k-level binary tree = 24 = 16 ⌈⌈⌈⌈ βŒ‰βŒ‰βŒ‰βŒ‰Min possible height of an 7 – vertex binary tree = ⌈⌈⌈⌈ log2 (7+1) -1 βŒ‰βŒ‰βŒ‰βŒ‰ = ⌈⌈⌈⌈ log2 (8) -1 βŒ‰βŒ‰βŒ‰βŒ‰ = ⌈⌈⌈⌈ 3 -1 βŒ‰βŒ‰βŒ‰βŒ‰ = 2 Max possible height of an 7 – vertex binary tree = (7-1)/2 = 4