2

I would like make the attached image by Mathematica. someone who could help me? Thank!enter image description here

user15850
  • 97
  • 3

2 Answers2

6

Not a perfect match but a start

Partition[Table[Column[{"i = " <> ToString[2^(n - 1)], 
 CompleteKaryTree[n, 
  ImagePadding -> 
   10, (AbsoluteOptions[
     CompleteKaryTree[n, VertexLabels -> "Name", ImagePadding -> 10], 
     VertexCoordinates] /. {x_?NumericQ, y_?NumericQ} :> {x, -y})], 
 "\[Omega] = " <> ToString[n]}, Center], {n, 2, 5}], 2] // Grid

enter image description here

Bob Hanlon
  • 157,611
  • 7
  • 77
  • 198
6

If you have Version 9, you can use the GraphLayout suboptions as follows:

bbt[n_] := 
Labeled[GraphUnion[CompleteKaryTree[n], Graph[{UndirectedEdge[0, 1]}],
                   BaseStyle ->Directive[Opacity[1], Black, PointSize[.015]],
                   EdgeStyle -> Directive[{Black, Thick}], AspectRatio -> 1,
                   VertexShapeFunction -> "Point",  ImageSize -> 300,
                   GraphLayout -> {"LayeredEmbedding", "RootVertex" -> 0,
                                   "Orientation" -> Bottom, 
                                   LayerSizeFunction -> (If[# == 1, 1, 2^(n - #)] &)}],
       {"i = " <> ToString[2^(n - 1)],"\[Omega] = " <> ToString[n]}, 
       {Top, Bottom}];

Row[bbt /@ Range[2,7], Spacer[5]]

enter image description here

kglr
  • 394,356
  • 18
  • 477
  • 896