|
SOLUTIONS
|
Mathematica
>
Mathematics and Algorithms
>
Graphs & Networks
>
Constructing Graphs
>
CompleteKaryTree
BUILT-IN MATHEMATICA SYMBOL
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.
New in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »



