Macaulay2 » Documentation
Packages » Graphs :: kneserGraph
next | previous | forward | backward | up | index | toc

kneserGraph -- constructs a kneser graph of specified size

Synopsis

Description

A kneser graph (n,k) has vertices corresponding to the k-element subsets of a set of n elements, where two vertices are adjacent if and only if their corresponding k-element subsets are disjoint.

i1 : G = kneserGraph(5,2)

o1 = Graph{0 => {5, 8, 9}}
           1 => {4, 7, 9}
           2 => {3, 6, 9}
           3 => {2, 7, 8}
           4 => {1, 6, 8}
           5 => {0, 6, 7}
           6 => {2, 4, 5}
           7 => {1, 3, 5}
           8 => {0, 3, 4}
           9 => {0, 1, 2}

o1 : Graph

Ways to use kneserGraph :

For the programmer

The object kneserGraph is a method function.