K-ary tree

K-ary tree

In graph theory, a k-ary tree is a rooted tree in which each node has no more than k children. It is also sometimes known as a k-way tree, an N-ary tree, or an M-ary tree.

A binary tree is the special case where k=2.

A full k-ary tree is a k-ary tree where within each level every node has either 0 or k children. A perfect k-ary tree is a k-ary tree in which all leaf nodes are at the same depth.[1]

For a k-ary tree with height h, the upper bound for the maximum number of leaves is kh. The total number of nodes is \frac{k^{h + 1} - 1}{k - 1}, while the height h is

\left\lceil\log_k (k - 1) + \log_k (\mathit{number\_of\_nodes}) - 1\right\rceil.

References

  1. ^ Black, Paul E. (20 April 2011). "perfect k-ary tree". U.S. National Institute of Standards and Technology. http://xlinux.nist.gov/dads/HTML/perfectKaryTree.html. Retrieved 10 October 2011. 
  • Storer, James A. (2001). An Introduction to Data Structures and Algorithms. Birkhäuser Boston. ISBN 3764342536. 

External links


Wikimedia Foundation. 2010.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Tree programming — refers to the use of a programming language to analyze data trees, in a way unique from conventional programming languages. This should not be confused with list based programming languages like Lisp and Scheme. Related languages *Linda… …   Wikipedia

  • Tree (graph theory) — Trees A labeled tree with 6 vertices and 5 edges Vertices v Edges v 1 Chromatic number …   Wikipedia

  • Tree of Life Web Project — The Tree of Life Web Project is an ongoing Internet project providing information about the diversity and phylogeny of life on Earth. This collaborative peer reviewed project began in 1995, and is written by biologists from around the world. The… …   Wikipedia

  • Ary-Mas — (Russian: Ары Мас) is a forest in Russia, Krasnoyarsk Krai, southern part of Taymyr Peninsula, southern bank of Novaya River. Ary Mas from Dolgan language forest island. Considered to be the northernmost forest of the world although Lukunsky… …   Wikipedia

  • d-ary heap — The d ary heap or d heap is a priority queue data structure, a generalization of the binary heap in which the nodes have d children instead of 2.[1][2][3] Thus, a binary heap is a 2 heap. According to Tarjan[2] and Jensen et al …   Wikipedia

  • Left child-right sibling binary tree — In computer science, a left child right sibling binary tree is a binary tree representation of a k ary tree. The process of converting from a k ary tree to an LC RS binary tree is not reversible in general without additional information.To form a …   Wikipedia

  • Binary tree — Not to be confused with B tree. A simple binary tree of size 9 and height 3, with a root node whose value is 2. The above tree is unbalanced and not sorted. In computer science, a binary tree is a tree data structure in which each node has at… …   Wikipedia

  • List of terms relating to algorithms and data structures — The [http://www.nist.gov/dads/ NIST Dictionary of Algorithms and Data Structures] is a reference work maintained by the U.S. National Institute of Standards and Technology. It defines a large number of terms relating to algorithms and data… …   Wikipedia

  • Список терминов, относящихся к алгоритмам и структурам данных —   Это служебный список статей, созданный для координации работ по развитию темы.   Данное предупреждение не устанавливается на информационные списки и глоссарии …   Википедия

  • Список терминов — Список терминов, относящихся к алгоритмам и структурам данных   Это сл …   Википедия

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”