0

I need to draw a diagram that looks something like this. I found that the qtree package wouldn't let me create trees without labels for the nodes, and with tikz it seems possible but manually spacing the nodes appears to be a waste of time. It seems like this would be a relatively common graph to plot, so is there anything I can use to plot it?

Factorial graph

3
  • 4
    Welcome to TeX.SX! Please, provide a MWE showing what you have tried so far and what abstract notion you are struggling with. Indeed, as it is written, this question falls into the 'do-it-for-me' category of questions which is not well received on this website.
    – KersouMan
    Commented Apr 25, 2023 at 14:53
  • @KersouMan Thanks. Given that there is already an answer, I'll remember this for next time. (I don't have the code I used any more, since I gave up and just removed it from my latex file)
    – Aric
    Commented Apr 25, 2023 at 16:32
  • 1
    Is that all you need? For each level one child less than at the previous level? Reminds me of Q135760 just without the grow cyclic. Commented Apr 25, 2023 at 18:55

1 Answer 1

6

This can be done with tikz by just defining some sibling distances manually and using for loops.

Code

\documentclass[margin=5mm]{standalone}

\usepackage{tikz}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture}[
    level 1/.style={sibling distance=30mm},
    level 2/.style={sibling distance=10mm},
    level 3/.style={sibling distance=5mm},
    shape=circle,
    every node/.style={draw, fill, inner sep=0pt},
    level distance=10mm,
]

    \node {} child foreach \i in {1,...,4}
        { node {} child foreach \i in {1,...,3}
            { node {} child foreach \i in {1,...,2}
                { node {} child
                    { node {} }
                }
            }
        };
\end{tikzpicture}

\end{document}

Result

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .