ninetynine-1.3.0: Ninety-Nine Haskell Problems
CopyrightCopyright (C) 2021 Yoo Chung
LicenseGPL-3.0-or-later
Maintainerdev@chungyc.org
Safe HaskellSafe-Inferred
LanguageGHC2021

Problems.P94

Description

Part of Ninety-Nine Haskell Problems. Some solutions are in Solutions.P94.

Synopsis

Documentation

regularGraphs Source #

Arguments

:: Int

\(n\)

-> Int

\(k\)

-> [G]

non-isomorphic \(k\)-regular graphs with \(n\) vertexes

Generate \(k\)-regular graphs with \(n\) vertexes.

In a \(k\)-regular graph, all vertexes have a degree of \(k\). I.e., the number of edges incident in each vertex is \(k\). How many non-isomorphic 3-regular graphs with 6 vertexes are there? See Problems.P94.Examples for examples of \(k\)-regular graphs.

Examples

>>> length $ regularGraphs 6 3
2