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() # convert from igraph to networkx igraphでは他には次のグラフ生成が可能です。 Kautz graphs Graph.Kau…