I would like to add extra edges between nodes that aren't specifically related as child and parents in a binary tree and also to change the styling of the edges.
Currently I have the following code:
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\title{}
\begin{document}
\maketitle
\begin{center}
\begin{tikzpicture}[
every node/.style = {minimum width = 2em, draw, circle},
level/.style = {sibling distance = 30mm/#1}
]
\node{u.p}
child {node {u}
child{node {u.e}}
child {edge from parent[draw = none]}
}
child {node {u.p.d}};
\end{tikzpicture}
\end{center}
\end{document}
And this is giving me the following output:
Now, my desired output would be to have dashed edges between u and u.p and between u and u.e and also an extra edge connecting u.e to u.p, if possible in red, i.e., something like this:
Thanks for any help in advance.