problem 5 Let T be a binary tree with n nodes, and let f() be the l.pdf

problem 5 Let T be a binary tree with n nodes, and let f() be the level numbering function of the positions of T, as given in Section 8.3.2. a. Show that, for every position p of T, f(p) 2^n 2. b. Show an example of a binary tree with seven nodes that attains the above upper bound on f(p) for some position p. Problem 6 Let T be an ordered tree with more than one node. Is it possible that the preorder traversal of T visits the nodes in the same order as the postorder traversal of T? If so, give an example; otherwise, explain why this cannot occur..

problem 5 Let T be a binary tree with n nodes, and let f() be the level numbering function of the
positions of T, as given in Section 8.3.2. a. Show that, for every position p of T, f(p) 2^n 2.
b. Show an example of a binary tree with seven nodes that attains the above upper bound on f(p)
for some position p.
Problem 6 Let T be an ordered tree with more than one node. Is it
possible that the preorder traversal of T visits the nodes in the same order as the
postorder traversal of T? If so, give an example; otherwise, explain why this cannot
occur.

Más contenido relacionado

Más de kishorchelani123(20)

Último(20)

Drama KS5 BreakdownDrama KS5 Breakdown
Drama KS5 Breakdown
WestHatch50 vistas
Azure DevOps Pipeline setup for Mule APIs #36Azure DevOps Pipeline setup for Mule APIs #36
Azure DevOps Pipeline setup for Mule APIs #36
MysoreMuleSoftMeetup75 vistas
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdfCWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
CWP_23995_2013_17_11_2023_FINAL_ORDER.pdf
SukhwinderSingh895865467 vistas
2022 CAPE Merit List 2023 2022 CAPE Merit List 2023
2022 CAPE Merit List 2023
Caribbean Examinations Council3K vistas
Narration  ppt.pptxNarration  ppt.pptx
Narration ppt.pptx
Tariq KHAN62 vistas
Psychology KS5Psychology KS5
Psychology KS5
WestHatch53 vistas
Narration lesson plan.docxNarration lesson plan.docx
Narration lesson plan.docx
Tariq KHAN90 vistas
Dance KS5 BreakdownDance KS5 Breakdown
Dance KS5 Breakdown
WestHatch52 vistas
Plastic waste.pdfPlastic waste.pdf
Plastic waste.pdf
alqaseedae81 vistas
Classification of crude drugs.pptxClassification of crude drugs.pptx
Classification of crude drugs.pptx
GayatriPatra1449 vistas
ICANNICANN
ICANN
RajaulKarim2057 vistas
Structure and Functions of Cell.pdfStructure and Functions of Cell.pdf
Structure and Functions of Cell.pdf
Nithya Murugan142 vistas
discussion post.pdfdiscussion post.pdf
discussion post.pdf
jessemercerail70 vistas

problem 5 Let T be a binary tree with n nodes, and let f() be the l.pdf

  • 1. problem 5 Let T be a binary tree with n nodes, and let f() be the level numbering function of the positions of T, as given in Section 8.3.2. a. Show that, for every position p of T, f(p) 2^n 2. b. Show an example of a binary tree with seven nodes that attains the above upper bound on f(p) for some position p. Problem 6 Let T be an ordered tree with more than one node. Is it possible that the preorder traversal of T visits the nodes in the same order as the postorder traversal of T? If so, give an example; otherwise, explain why this cannot occur.