cocktailParty -- Returns a cocktail party graph

Synopsis

• Usage:
G = cocktailParty n
• Inputs:
• n, an integer, The number of vertices on each side; there will be 2*n total vertices
• Outputs:
• G, an instance of the type Graph, The cocktail party graph

Description

The cocktail party graph with respect to an integer n is a graph with 2*n vertices. Its edge set is formed by taking a disjoint union of n path graphs on 2 vertices and taking its complement, yielding an edge set of every possible edge except for those that were initially adjacent on the ladder.

 i1 : cocktailParty 4 o1 = Graph{0 => {1, 2, 3, 5, 6, 7}} 1 => {0, 2, 3, 4, 6, 7} 2 => {0, 1, 3, 4, 5, 7} 3 => {0, 1, 2, 4, 5, 6} 4 => {1, 2, 3, 5, 6, 7} 5 => {0, 2, 3, 4, 6, 7} 6 => {0, 1, 3, 4, 5, 7} 7 => {0, 1, 2, 4, 5, 6} o1 : Graph

Ways to use cocktailParty :

• "cocktailParty(ZZ)"

For the programmer

The object cocktailParty is .