The barbell graph corresponding to an integer n is formed by the disjoint union of two complete graphs on n vertices joined together by exactly on edge connecting these complete graphs.
i1 : G = barbellGraph 6 o1 = Graph{0 => {1, 2, 3, 4, 5} } 1 => {0, 2, 3, 4, 5} 2 => {0, 1, 3, 4, 5} 3 => {0, 1, 2, 4, 5} 4 => {0, 1, 2, 3, 5} 5 => {0, 1, 2, 3, 4, 6} 6 => {5, 7, 8, 9, 10, 11} 7 => {6, 8, 9, 10, 11} 8 => {6, 7, 9, 10, 11} 9 => {6, 7, 8, 10, 11} 10 => {6, 7, 8, 9, 11} 11 => {6, 7, 8, 9, 10} o1 : Graph |
The object barbellGraph is a method function.