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

ladderGraph -- Returns a ladder graph

Synopsis

Description

A ladder graph of length n is two path graphs of size n each joined by a set of n edges. The first edge connects the top elements, the second the second elements and the last edge connects the bottom elements, making a 2 by n grid that looks like a ladder.

i1 : ladderGraph 5

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

o1 : Graph

See also

Ways to use ladderGraph :

For the programmer

The object ladderGraph is a method function.