Function Repository Resource:

# KleinBottleGraph

Create a grid graph in the shape of a Klein bottle

Contributed by: Richard Hennigan (Wolfram Research)
 ResourceFunction["KleinBottleGraph"][{a,b}] gives an a×b grid connected as a Graph that corresponds to the 1-skeleton of the Klein bottle. ResourceFunction["KleinBottleGraph"][{a,b,n1,…,nk}] gives a graph corresponding to the product of the Klein bottle and a k-torus.

## Details and Options

ResourceFunction["KleinBottleGraph"] takes the same options as Graph.

## Examples

### Basic Examples (3)

Make a 3×3 Klein bottle graph:

 In[1]:=
 Out[1]=

Compare to a torus graph:

 In[2]:=
 Out[2]=

Make a 10×20 Klein bottle graph:

 In[3]:=
 Out[3]=

Compare to a torus graph:

 In[4]:=
 Out[4]=

The Klein bottle is a torus with a "twist":

 In[5]:=
 Out[5]=

Compare to a torus graph:

 In[6]:=
 Out[6]=

### Scope (1)

Make a 10×15×5 Klein bottle graph:

 In[7]:=
 Out[7]=

### Properties and Relations (4)

Define a torus graph and Klein bottle graph:

 In[8]:=

Much like the torus, cutting the Klein bottle in one direction yields a cylinder:

 In[9]:=
 Out[9]=
 In[10]:=
 Out[10]=

However, cutting the Klein bottle in the other direction yields a Möbius strip:

 In[11]:=
 Out[11]=

The torus still produces a cylinder:

 In[12]:=
 Out[12]=

In one dimension, KleinBottleGraph is equivalent to TorusGraph:

 In[13]:=
 Out[13]=
 In[14]:=
 Out[14]=

Compute the volumes of neighborhoods around a node in the Klein bottle graph:

 In[15]:=
 Out[15]=

Estimate the dimension of the Klein bottle from its graph:

 In[16]:=
 Out[16]=

This yields the same estimate as the torus:

 In[17]:=
 Out[17]=
 In[18]:=
 Out[18]=

Perform a three-way comparison between grid graphs, toroidal grid graphs and Klein bottle graphs:

 In[19]:=
 Out[19]=
 In[20]:=
 Out[20]=
 In[21]:=
 Out[21]=

### Neat Examples (2)

Show how a ball of radius r grows in the graph when represented as a flat grid (the red edge indicates where the "twist" occurs):

 In[22]:=
 Out[22]=

Visualize the 3D case:

 In[23]:=
 Out[23]=

## Version History

• 3.0.0 – 28 April 2020
• 1.0.0 – 22 April 2020