我想看看彼得森图的一些同构;我从这里,并使用来自这里,但结果树形布局与 Petersen 图不同构:
\usetikzlibrary{graphs, graphdrawing, quotes}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{graphs.standard}
\usegdlibrary{trees, layered}
\usegdlibrary{force,circular,trees}
\begin{document}
\tikz \graph[tree layout, nodes={empty nodes, draw, circle, inner sep=0.45mm, fill=black}, clockwise]
{ subgraph I_n [V={0,1,2,3,4}] --
subgraph C_n [V={5,6,7,8,9},radius=1.25cm];
{[cycle] 0,2,4,1,3} };
\end{document}
答案1
我不认为彼得森图被视为具有 的图tree layout
。
如果我tree layout
从你的\graph
命令中删除,我会得到非常不同的输出。
代码
\documentclass[tikz]{standalone}
\usetikzlibrary{graphs, graphs.standard, graphdrawing}
\usegdlibrary{trees}
\begin{document}
\tikz \graph[
nodes={empty nodes, draw, fill, circle, inner sep=0.45mm},
clockwise
] {
subgraph I_n [V={0,1,2,3,4}]
--
subgraph C_n [V={5,6,7,8,9}, radius=1.25cm];
{[cycle] 0,2,4,1,3};
};
\end{document}