![我如何构建树形图?](https://linux22.com/image/356254/%E6%88%91%E5%A6%82%E4%BD%95%E6%9E%84%E5%BB%BA%E6%A0%91%E5%BD%A2%E5%9B%BE%EF%BC%9F%20.png)
答案1
最小努力问题 ⇒ 最小努力答案
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}
\begin{document}
\begin{tikzpicture}
\graph[tree layout,grow=right,fresh nodes] {
"" -- {
"1" -- {
"3 (1,3)",
"5 (1,5)"
},
"2" -- {
"3 (2,3)",
"5 (2,5)"
},
"4" -- {
"3 (4,3)",
"5 (4,5)"
}
}
};
\end{tikzpicture}
\end{document}