Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Give an upper bound and a lower bound for the height of a B-tree of degree k with n leaves.

Short Answer

Expert verified

Therefore, the upper bound and a lower bound for the height of B-tree of degree k with n leaves are\({\bf{lo}}{{\bf{g}}_{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil }}\left( {\frac{{\bf{n}}}{{\bf{2}}}} \right){\bf{ + 1}}\) and \({\bf{lo}}{{\bf{g}}_{\bf{k}}}{\bf{n}}\).

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

Over 22 million students worldwide already upgrade their learning with Vaia!

01

General form

Definition of tree: A tree isa connected undirected graph with no simple circuits.

Definition of Circuit:It isa path that begins and ends in the same vertex.

B-tree of degree k(Definition): It is a rooted tree such that all its leaves are at the same level, its root has at least two and at most k children unless it is a leaf, and every internal vertex other than the root has at least \(\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil \), but no more than k, children. Computer files can be accessed efficiently when B-trees are used to represent them.

Definition of Upper bound of a set: An element in a poset greater than all other elements in the set.

Definition of Lower bound of a set: An element ina poset less than all other elements in the set.

02

Evaluation of the given statement

Given that, a B-tree of degree k with n leaves.

Lower bound for the number of leaves:

A B-tree of degree k has at most k children at every internal vertex.

At level 0, we only have the root.

At level 1, the tree then has at most k vertices, as the root can have at most k children.

At level 2, the tree has at most \({\bf{k}}*{\bf{k = }}{{\bf{k}}^{\bf{2}}}\) vertices.

At level 3, the tree has at most \({\bf{k}}*{{\bf{k}}^{\bf{2}}}{\bf{ = }}{{\bf{k}}^{\bf{3}}}\) vertices.

Since, a B-tree of degree k with height h has at most \({{\bf{k}}^{\bf{h}}}\) vertices. So, the number of leaves is \({\bf{n}} \le {{\bf{k}}^{\bf{h}}}\).

Let us take the logarithm with base k on both sides.

\({\bf{lo}}{{\bf{g}}_{\bf{k}}}{\bf{n}} \le {\bf{h}}\)

So, the lower boundary for the height is \({\bf{lo}}{{\bf{g}}_{\bf{k}}}{\bf{n}}\).

03

Upper bound for the number of leaves

A B-tree of degree k has at least \(\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil \) children at every internal vertex, except the root which has at least 2 children.

At level 0, we only have the root.

At level 1, the tree then has at least 2 vertices, as the root can have at least 2 children.

At level 2, the tree has at least \({\bf{2}}*\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil {\bf{ = 2}}\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil \) vertices.

At level 3, the tree has at least \({\bf{2}}\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil *\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil {\bf{ = 2}}{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil ^{\bf{2}}}\) vertices.

Since, a B-tree of degree k with height h has at most \({\bf{2}}{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil ^{{\bf{h - 1}}}}\) vertices. So, the number of leaves is \({\bf{n}} \ge {\bf{2}}{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil ^{{\bf{h - 1}}}}\).

Now divide 2 on both sides and take logarithm with base \(\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil \) on both sides.

\(\begin{array}{l}{\bf{lo}}{{\bf{g}}_{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil }}\left( {\frac{{\bf{n}}}{{\bf{2}}}} \right) \ge {\bf{h - 1}}\\{\bf{lo}}{{\bf{g}}_{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil }}\left( {\frac{{\bf{n}}}{{\bf{2}}}} \right){\bf{ + 1}} \le {\bf{h}}\end{array}\)

So, the upper boundary for the height is \({\bf{lo}}{{\bf{g}}_{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil }}\left( {\frac{{\bf{n}}}{{\bf{2}}}} \right){\bf{ + 1}}\).

Conclusion: The upper bound for the number of leaves is \({\bf{lo}}{{\bf{g}}_{\left\lceil {\frac{{\bf{k}}}{{\bf{2}}}} \right\rceil }}\left( {\frac{{\bf{n}}}{{\bf{2}}}} \right){\bf{ + 1}}\) and the lower bound for the number of leaves is \({\bf{lo}}{{\bf{g}}_{\bf{k}}}{\bf{n}}\).

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Show that a directed graph \({\bf{G = }}\left( {{\bf{V,E}}} \right)\) has an arborescence rooted at the vertex r if and only if for every vertex \({\bf{v}} \in {\bf{V}}\), there is a directed path from r to v.

In this exercise we will develop an algorithm to find the strong components of a directed graph \({\bf{G = }}\left( {{\bf{V,E}}} \right)\). Recall that a vertex \({\bf{w}} \in {\bf{V}}\) is reachable from a vertex \({\bf{v}} \in {\bf{V}}\) if there is a directed path from v to w.

  1. Explain how to use breadth-first search in the directed graph G to find all the vertices reachable from a vertex \({\bf{v}} \in {\bf{G}}\).
  2. Explain how to use breadth-first search in \({{\bf{G}}^{{\bf{conv}}}}\) to find all the vertices from which a vertex \({\bf{v}} \in {\bf{G}}\) is reachable. (Recall that \({{\bf{G}}^{{\bf{conv}}}}\) is the directed graph obtained from G by reversing the direction of all its edges.)
  3. Explain how to use part (a) and (b) to construct an algorithm that finds the strong components of a directed graph G, and explain why your algorithm is correct.

Show that if no two edges in a weighted graph have the same weight, then the edge with least weight incident to a vertex v is included in every minimum spanning tree.

Devise an algorithm for constructing the spanning forest of a graph based on deleting edges that form simple circuits.

Answer these questions about the rooted tree illustrated.

  1. Which vertex is the root\(?\)
  2. Which vertices are internal\(?\)
  3. Which vertices are leaves\(?\)
  4. Which vertices are children of \({\bf{j}}\)\(?\)
  5. Which vertex is the parent of \({\bf{h}}\)\(?\)
  6. Which vertices are siblings of \({\bf{o}}\)\(?\)
  7. Which vertices are ancestors of \({\bf{m}}\)\(?\)
  8. Which vertices are descendants of \({\bf{b}}\)\(?\)
See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free