These are the source files for some of the programs
used in the preprint:
https://arxiv.org/abs/2007.08474
The programs were written, compiled and tested
in a Linux-Ubuntu machine and use
gcc (GNU C compiler) and gmp (GNU Multi Precision).
WARNING!
Some ot these example require large amounts of memory and of disk space!
If your computer does not have enough memory it will probably crash!
Compile the programs and unpack the examples by running:
make
Each directory should now contain a few small files;
for instance, directory 222 should contain:
adj222.txt (The matrix $K$ in the preprint)
bv222-00.txt (A unit vector of the appropriate dimension)
runme222 (A script file)
In order to run an example, change into directory
and run the runme file.
For instance:
cd 222
./runme222
In this case we are counting tilings according to twist
in regions of the form 2x2x2xN = [0,2]x[0,2]x[0,2]x[0,N].
The first line of the script file creates
the matrices $A$ and $\tilde A$ discussed in the preprint.
For instance, in the 222 directory:
nice ../adj adj222.txt adj222a.txt adj222at.txt
creates the files:
adj222a.txt (The matrix $A$ in the preprint)
adj222at.txt (The matrix $\tilde A$ in the preprint)
Notice that the program adj reads from the first argument
(in this case adj222.txt)
and writes onto the next two arguments
(in this case adj222a.txt and adj222at.txt).
The next lines of the script create the files
bvXXX-NNa.txt and bvXXX-NNat.txt.
In this example:
nice ../lala adj222a.txt bv222-00.txt bv222-01a.txt; head -1 bv222-01a.txt
nice ../lala adj222at.txt bv222-00.txt bv222-01at.txt; head -1 bv222-01at.txt
nice ../lala adj222a.txt bv222-01a.txt bv222-02a.txt; head -1 bv222-02a.txt
nice ../lala adj222at.txt bv222-01at.txt bv222-02at.txt; head -1 bv222-02at.txt
The program lala expects to read a matrix in the first argument
and a vector in the second argument.
If all goes well, it writes a vector in the third argument.
These are $A^N e_0$ and $\tilde A^N e_0$.
In particular, the top entry gives us:
the number of tilings of $\cR_N = \cD \times [0,N]$ and $\Delta(\cR_N)$.
Recall that $\Delta(.)$ counts tilings with twist 0 positively
and with twist 1 negatively.
For instance, after changing directory to 224 and running the script:
cd 224
./runme224
we have e few new files:
head -1 bv224-08a.txt
71078263639970542379841
so that is the number of tilings of the box 2x2x4x8.
We also have
head -1 bv224-08at.txt
16380359370521255556001
so that is the defect,
the difference between the number of tilings with twist 0
and the number of tilings with twist 1.
Directories 2233 and 2234 are for a different kind of example.
If you do:
cd 2233
./runme2233
this will first produce a file with a list of all 862112 tilings
of the 2x2x3x3 box (using the program listall)
and then compute the connected components via flip
(using the program comps).
If all goes well, after some time you will have a file
tilings2233comp.txt
with a list of tilings and connected components.
The largest one should have 762572 tilings of twist 0,
the second one 99280 tilings of twist 1.
There should be 18 very small components:
16 components of size 16 and twist 0 and
2 components of size 2 and twist 0.
Similarly, if you do:
cd 2234
./runme2234
this will first produce a file with a list of all 127027769 tilings
of the 2x2x3x4 box (using the program listall)
and then compute the connected components via flip
(using the program comps).
WARNING! This consumes large amounts of time, memory and disk space!
If all goes well, after some time you will have a file
tilings2234comp.txt
with a list of tilings and connected components.
The largest one should have 106303993 tilings of twist 0,
the second one should have 20723112 tilings of twist 1.
There should be 40 very small components:
8 components of size 49 and twist 0,
16 components of size 16 and twist 1 and
16 components of size 1 and twist 1.
Therefore, the total number of connected components is 42.