What is a Graph? · Definitions

Lesson 3

Nikolai Chukhin · Alexander S. Kulikov

A graph is called regular if all of its nodes have the same degree. In particular, all nodes of a \(d\)-regular graph have degree \(d\).

In Python, one can generate a random regular graph as follows.

from networkx import nx_agraph, random_regular_graph

graph = random_regular_graph(n=12, d=5)
nx_agraph.to_agraph(graph).draw('regular_graph.png', prog='circo')