サブロウ丸

Sabrou-mal サブロウ丸

主にプログラミングと数学

2023-09-01から1ヶ月間の記事一覧

NetworkxでKautzグラフを構築する。

igraph経由で行うと楽です。 pythonパッケージ↓ import igraph as ig # m = the size of the alphabet minus one # n = the length of the strings minus one # total nodes = (m+1)m^n # degree = m G = ig.Graph.Kautz(3, 1) nx_G = G.to_networkx() # con…