2017-10-09から1日間の記事一覧

SageMathとグラフ理論(オイラーの公式)

問題 車輪グラフついて、オイラーの公式(Euler's formula)が成り立つことを確認せよ。 オイラーの公式: $$ n - m + f = 2 $$ : 頂点の数、: 辺の数、: 面の数 %histG=graphs.WheelGraph(8)show(G)len(list(G.vertex_iterator())) # -> 8len(list(G.edge_ite…