I recently worked a problem that required counting the number of paths to a node in a lattice. For something to do, I decided to try to produce a visualization of how the number of paths increases with increasing distance from the starting node – the origin. Here is an example of a path from the origin to the the point (5,5,5) created with *Mathematica.*

Random Path Through a 5x5x5 Lattice

The path randomly decides to increase one unit in either the *x* or the *y* or the *z* direction with equal probability. The total number of paths to (5,5,5) is .

I first thought to use *gephi, *a program that produces graph theory graphs but I couldn’t get the hang of it and managed this graph before I gave up.

Gephi Depiction of Lattice

This depiction uses YifanHu’s Multilevel scheme. This scheme shows the three dimensional structure but is not fully rotatable.

So I turned to *Mathematica *to produce my own drawings. A first try produced this.

5x5x5 Lattice – Node Size equals Number of Paths

And then this.

5x5x5 Lattice – Node Size equals Number of Paths – Another Example

The node size corresponds to the number of paths to that node.

The pictures are not very informative obviously because the number of paths is a factorial expression. So I decided to use the logarithm of the number of paths. Thus this,

5x5x5 Lattice – Log Node Size equals Number of Paths

And this with color coding for number of paths added.

But now I have lost all sense of the size of the increase since I am using logarithms. I ended my exploration here.

Random Paths Through a 5x5x5 Lattice

I was thinking of creating an animation but to what end. I have five classes to occupy me now. So just some pretty? pictures.

### Like this:

Like Loading...

*Related*

## About jrh794

I am a sixty-five year old math instructor at Southern Oregon University. I taught at the College of the Siskiyous in Weed California for twenty-six years. Prior to that I worked as a computer programmer, carpenter and in various other jobs. I graduated from Rice University in 1967 and have a MS in Operations Research from Stanford. In the past I have hand-built a stone house and taken long solo bicycle tours. Now I ride my mountain bike and play golf for recreation.