Skip to content

Algorithms and utilities for the Lattices and group theories.

Notifications You must be signed in to change notification settings

barcoyou/Lattice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

Lattice Project
-------------------------------------------------------------------------------------------------
This project is for algorithms and utilities for manipulating lattices and
relevant group theories.
-------------------------------------------------------------------------------------------------

Lattice Path

A path composed of connected horizontal and vertical or other directional line segments, each
passing between adjacent lattice points. A lattice path is therefore a sequence of points
P0,P1,Pn ...,  with Pn > 0 such that each Pi is a lattice point and Pi+1 is obtained by 
offsetting one unit east (or west) or one unit north (or south) or more units in other directions.

The number of paths of length a+b+.. from the origin (0,0,..) to a point (a,b,..) which are 
restricted towards the opposite corner of the lattice is given by
(a+b+...)!/(a!b!*...).

Please refer to http://demonstrations.wolfram.com/PathsThroughACubicLattice for
an illustrative example.

Exmaple:
1. To generate a 4x4x4 cubic lattice with every lattice point recording the number paths (emanating
from origin [0,0,0] to the opposite corner [3,3,3]) across it:
Cube = lattice_path:build([3,3,3]).
2. To get the number of lattice path at the coordinate [2,1,2] of the cubic lattice generated in
previous step:
Number1 = lattice_path:get_number_path([2,1,2], Cube).
3. To get the number of lattice path emanating from the coordinate [1,1,1] to the coordinate
[3,3,3] of the cubic lattice generated in step 1:
Number2 = lattice_path:get_number_path([1,1,1],[3,3,3],Cube).
--------------------------------------------------------------------------------------------------

About

Algorithms and utilities for the Lattices and group theories.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages