CompleteKaryTree

CompleteKaryTree[n]
gives the complete binary tree with n levels.

CompleteKaryTree[n,k]
gives the complete k-ary tree with n levels.

Details and OptionsDetails and Options

  • The complete k-ary tree with n levels is a rooted tree with k branches at each node and n levels deep.
  • The complete k-ary tree with n levels has vertices.
  • CompleteKaryTree[,DirectedEdges->True] gives a directed complete k-ary tree.
  • CompleteKaryTree takes the same options as Graph.
Introduced in 2010
(8.0)