next | previous | forward | backward | up | index | toc

# generalizedPetersenGraph -- Returns a generalized petersen graph

## Synopsis

• Usage:
G = generalizedPetersenGraph (n, k)
• Inputs:
• n, an integer, The number of vertices will be 2*n, n in the outer ring and n in the inside ring
• k, an integer, The middle ring is a complete graph but looks like a star, k is the number of vertices that get jumped for each connection k must be less than n/2.
• Outputs:
• G, , The generalized petersen graph

## Description

The generalized Petersen Graph is a class of graphs with a particular edge set. There are two equal sets of vertices and each set is a cycle graph. This forms two disjoint cyclegraphs. Then each inside edge connects to an adjacent outside edge, similar to the circular ladder graph. The outer loop keeps a more "canonical" order for the cycle, in the sense that it does not "skip" vertices, while the inner cycle takes on a "star-like pattern" that jumps vertices but is still connected.

 i1 : generalizedPetersenGraph (5,2) o1 = Graph{0 => {1, 4, 5}} 1 => {0, 2, 6} 2 => {1, 3, 7} 3 => {2, 4, 8} 4 => {0, 3, 9} 5 => {0, 7, 8} 6 => {1, 8, 9} 7 => {2, 5, 9} 8 => {3, 5, 6} 9 => {4, 6, 7} o1 : Graph

## Ways to use generalizedPetersenGraph :

• "generalizedPetersenGraph(ZZ,ZZ)"

## For the programmer

The object generalizedPetersenGraph is .