Downloads

    "Among scientists are: collectors, classifiers, and compulsive tidiers-up."
    - Sir Peter Medawar, The Art of the Soluble
  1. Bouwkamp Codes(zipped txt)
  2. Catalogues of Squared Rectangles
  3. Catalogues of Squared Squares
  4. Catalogues of Right Isosceles Triangle Tilings
  5. Catalogues of Equilateral Triangle Tilings
  6. Software

Bouwkamp code

Squared rectangles and squared squares are often represented in a concise form known as Bouwkamp code (or bouwkampcode), named after C.J. Bouwkamp who invented this notation and popularised its use.

barcode label printers

Bouwkamp code consists of a string of numbers giving firstly the number of squares in the dissection (called the Order), the width and height of the square dissection, where width >= height, and finally the sizes of the squares of the tiling, often called the elements, as integers e1, e2, e3, ... en (with or without parentheses or commas), which are arranged from left to right and then top to bottom in quite an extensive method of identification.

In the published literature parentheses and commas are used to group consecutive squares in a horizontal row and the groups are in order of decreasing height.

The Bouwkamp code parentheses are not required to reconstruct the tiling but they make it easier to sketch a tiling by hand and all published literature uses them. Bouwkamp code without parentheses and commas has been named tablecode and introduced by J.D. Skinner. It is simpler and shorter. The bouwkampcode and tablecode for the 69 x 61 Squared Rectangle figure above is 9 69 61 (36,33)(5,28)(25,9,2)(7)(16) and 9 69 61 36 33 5 28 25 9 2 7 16. Tablecode, bouwkampcode and Bouwkamp code are used interchangeably in this site.

Extended Bouwkampcode

There are several additional fields which are sometimes included in the Bouwkampcode, we can call these codes Extended Bouwkampcode ; In datafiles from this site the additional fields are included after the main bouwkampcode. An asterix * is used to divide the bouwkampcode fields from the additional fields. These additional fields are used for captions, ie placing information such as the tiling id, discoverer, isomer number, year of discovery underneath the tiling in illustrations in webpages such as those on this site or in the production of postscript images of squared squares.

Rotations and reflections of a square tiling may create different Bouwkamp codes. Canonical Bouwkamp code is the unique code which is the highest Bouwkamp code, the one that is numerically largest (comparing elements going left to right) from the Bouwkamp codes of all possible rotated and reflected versions of that square tiling.

If squared rectangles and squared squares are put into canonical Bouwkamp code form, duplicates of existing tilings can easily be identified, new discoveries can be verified and complete catalogues for many low order tilings can be made in a compact text form, suitable for computer data processing, document production, browser viewing and computer graphics rendering.

For SPSRs the canonical Bouwkamp code is also the one corresponding to the dissection where the largest corner element is in the top left corner and is listed first out of the elements. This is easy to check.

For SPSSs only the first two elements need to be examined for highest Bouwkamp code, that is the largest square in the top left corner and largest square adjacent to it, which goes on its right. These two elements are the first and the second listed elements in the canonical Bouwkamp code.

For Imperfect tilings (SISSs, SISRs) it may be necessary to examine all elements in the Bouwkamp code to determine the canonical highest Bouwkamp code.

We refer to different squared squares with the same elements as isomers. The smallest order for SPSS isomers is 25 for pairs and 28 for triples. By definition a CPSS is one of at least four isomers. A CPSS is one of up to 8 isomers in order 25, 16 isomers in orders 26 and 27, and 48 isomers in order 28. The Sprague square of order 55 is one of 12,582,912 isomers! For every order there is a CPSS catalogue with only a representative CPSS for each set of isomers. For the lowest orders there are also catalogues which include all the isomers.

Unfortunately many CPSS in the published literature are not recorded in any discernably consistent canonical Bouwkamp code representation.

The catalogues of representative CPSSs are being converted in 2012 so that every representative CPSS is determined according to the same set of rules, which appear below. Most of the website catalogues are in this form already.

Each simple subrectangle in a canonical representative CPSS is in 'standard form' so that, sometimes after first rotating the square one quarter turn clockwise, the subrectangle is seen with its longer side horizontal and its largest corner element in the upper left corner. This is how SPSRs are depicted in their catalogues. This also applies to a simple subrectangle with a missing corner element as if that element were present, but without any restriction on the amount by which the square may first be turned (example: CPSS 30:705c), only that the squared subrectangle is not a mirror image of its standard form.

Occasionally, when two subrectangles (with or without a missing corner element) overlap by sharing a corner element, it may not be possible for both subrectangles to be oriented in the desired form.

The canonical representative CPSS is an isomer with the most subrectangles, including those which contain smaller subrectangles. In practice this means;

The canonical representative is the CPSS isomer with the 'highest Bouwkampcode' (by element values, not lexicographically) that complies with the above rules.

J.D. Skinners Bouwkamp codes

J.D. Skinner has supplied the following listing and tablecode for squared squares from orders 21 to order 30. This file has not been updated since 2003..

biglist.zip(41k) has a listing of the squared squares by order, size/id and type (SIMP/COMP) - the size/id is different from the system used on this website, it is a concatenation of the size and an uppercase alpha character(s) where ALL perfect squared squares of a given order (both SPSS and PSS) are indexed. The size/id in biglist.zip is used to refer to the corresponding Bouwkamp code in the 00table.zip file. Discoverers initials are included.

00table.zip(558k) contains the corresponding Bouwkamp codes (in tablecode form).

David Moews Bouwkamp codes

David Moews has an explanation and an example of the use of Bouwkamp code.

David Moews homepage has Bouwkamp codes of all simple perfect squared rectangles (SPSR) of orders from 9 to 16, and Bouwkamp codes of all perfect squared squares (PSS) of orders from 21 to 24 (and some of orders from 25 to 27.)

A.J.W. Duijvestijn's order 26 SPSS, 2x1 SPSR paper and Bouwkamp codes

The AMS has provided a free download of Duijvestijn's paper on Order 26 simple perfect squared squares (SPSSs) and 2x1 simple perfect squared rectangles (SPSRs). Copies have been supplied of the missing Bouwkamp codes TableI Order 26 SPSSs and TableII Order 26 2x1 SPSRs which originally accompanied the paper.

Catalogues of Perfect Squared Squares

Simple Perfect Squared Squares, (SPSSs) Orders 21+. Pdfs, bouwkampcodes & tablecodes.

      SPSS Order 21 (Complete)

    1. (1) SPSSs Order 21, (5k Pdf)
    2. SPSS bouwkampcode Order 21,
    3. SPSS tablecode Order 21,

      SPSSs Order 22 (Complete)

    1. (8) SPSSs Order 22, (14k Pdf)
    2. SPSSs bouwkampcode Order 22,
    3. SPSSs tablecode Order 22,

      SPSSs Order 23 (Complete)

    1. (12) SPSSs Order 23, (19k Pdf)
    2. SPSSs bouwkampcode Order 23,
    3. SPSSs tablecode Order 23,

      SPSSs Order 24 (Complete)

    1. (26) SPSSs Order 24, (39k Pdf)
    2. SPSSs bouwkampcode Order 24,
    3. SPSSs tablecode Order 24,

      SPSSs Order 25 (Complete)

    1. (160) SPSSs Order 25, (220k Pdf)
    2. SPSSs bouwkampcode Order 25,
    3. SPSSs tablecode Order 25,

      SPSSs Order 26 (Complete)

    1. (441) SPSSs Order 26, (619k Pdf)
    2. SPSSs bouwkampcode Order 26,
    3. SPSSs tablecode Order 26,

      SPSSs Order 27 (Complete)

    1. (1152) SPSSs Order 27, (1.6M Pdf)
    2. SPSSs bouwkampcode Order 27,
    3. SPSSs tablecode Order 27,

      SPSSs Order 28 (Complete)

    1. (3001) SPSSs Order 28, (4.4M Pdf)
    2. SPSSs bouwkampcode Order 28,
    3. SPSSs tablecode Order 28,

      SPSSs Order 29 (Complete)

    1. (7901) SPSSs Order 29, (11.1M Pdf)
    2. SPSSs bouwkampcode Order 29,
    3. SPSSs tablecode Order 29,

      SPSSs Order 30

    1. (13211) SPSSs Order 30, (19.9M Pdf) incomplete
    2. SPSSs bouwkampcode Order 30, incomplete
    3. SPSSs tablecode Order 30, incomplete

      SPSSs Order 31

    1. (27352) SPSSs Order 31, (25.3M Pdf) incomplete
    2. SPSSs bouwkampcode Order 31, incomplete
    3. SPSSs tablecode Order 31, incomplete

      SPSSs Order 32

    1. (62905) SPSSs Order 32, (11.4M Postscript) incomplete
    2. SPSSs bouwkampcode Order 32, incomplete
    3. SPSSs tablecode Order 32, incomplete

      SPSSs Order 33

    1. (142886) SPSSs Order 33, (8M Postscript zipped) incomplete
    2. SPSSs bouwkampcode Order 33 (9.2M zipped), incomplete
    3. SPSSs tablecode Order 33 (8.2M zipped), incomplete

      SPSSs Order 34

    1. (9929) SPSSs Order 34, (16.2M Pdf) incomplete
    2. SPSSs bouwkampcode Order 34 (1.8M), incomplete
    3. SPSSs tablecode Order 34 (1.6M), incomplete

      SPSSs Order 35

    1. (21856) SPSSs Order 35, (7.7M Pdf) incomplete
    2. SPSSs bouwkampcode Order 35 (4.2M), incomplete
    3. SPSSs tablecode Order 35 (3.8M), incomplete

      SPSSs Order 36

    1. (47029) SPSSs Order 36, (3.7M postscript zipped) incomplete
    2. SPSSs bouwkampcode Order 36 (9.4M), incomplete
    3. SPSSs tablecode Order 36 (8.5M), incomplete

Compound Perfect Squared Squares (CPSSs) Orders 24+. Pdfs, bouwkampcodes & tablecodes.

Software

Stuart Anderson's squared square finder (sqfind) and Bouwkampcoder (sqt) (2012)

sqfind operates on plantri planarcode binary files. It finds graphs that correspond to squared squares and extracts them and saves them as extracted files (x_files) in the plantri format. To convert the x_files to squared square Bouwkampcodes, and to filter the Bouwkampcodes into simple, compound, perfect or imperfect, sqt, is run on the x_files.

Sqt can be used directly on plantri output, but if finding squared squares from plantri files is the goal, it is much faster to search first with sqfind. If the aim is to produce squared rectangles, not squared squares, then sqt must be used.

Compile with g++ for Linux and Mac and MinGW for Windows XP and Windows 7.

Both programs are in this zip file

David Moews simple perfect squared rectangles (SPSRs) generator (GPL!)

David Moews homepage also has GPL'd software (written in C) to produce simple perfect squared rectangles (SPSRs).

graph.c enumerates all simple perfect squared rectangles with order 20 or below (the order can easily be varied by editing the source). Each rectangle's order, size, and Bouwkamp code is printed, one rectangle to a line. Also, some statistics on graphs used to generate the rectangles are printed.

Stuart Anderson's ssh (squared square hunter)

Stuart Anderson's 'ssh.exe' (squared square hunter - finds SPSS, SISS, SPSR and SISR) - this binary was produced using an out of date object LEDA research library in 2001 and is no longer supported by the author. ssh (squared square hunter) is a windows command-line program which searches for simple perfect or simple imperfect squared squares (SPSSs or SISSs) in the c-nets produced by Brinkmann and McKay's plantri program. Ssh.exe can also be used to produce simple perfect or simple imperfect squared rectangles (SPSRs or SISRs). If you type the executable name you will see a screen like this;

ssh(windows exe download) - Squared Square Hunter by Stuart Anderson,

Squared Squares are dissections of squares into smaller squares, all integer sizes and preferably all different sizes.

Squared Square Hunter (ssh) generates squared squares and squared rectangles from plantri generated 3-connected planar maps.

Plantri is by Gunnar Brinkmann and Brendan McKay and is available from http://cs.anu.edu.au/~bdm/plantri/ .

ssh has many options and combinations

Syntax is: ssh [-scpirSthd] filename (filename is a plantri binary file).

[-scpirSht] are the optional arguments.

s (lower case) for simples

c for compounds - not implemented

p for perfects

i for imperfects

r for rectangles

S (upper case) for squares

h for bouwkampcode in html output.

t for tablecode output, i.e. w h followed by elements in bouwkampcode order (no parentheses).

d for screen display/file dump, better on for squares rather than rectangles (slows things down)

ssh is still quite a useful program for producing squared rectangles and squared squares in the orders 9 - mid 20s', although it is too slow for searching large graph classes in higher orders, it quite quickly produces excellent bouwkampcode and tablecode if the graphs corresponding to squared squares are already found. Nowadays I use other software to search for the plantri graphs in the higher orders which correspond to squared squares, then use ssh to produce the bouwkampcode. ssh runs on WinXP, Vista, Windows 7 as well as under wine on ubuntu. If you need further instructions on how to use it, email me. (stuart.errol.anderson@gmail.com)

Stuart Anderson's, Armin Singer's and Lorenz Milla's Bouwkampcode Utilities Collection;

A number of C,C++ programs have been written to assist in the cataloging, processing and analysis of square tilings.

  1. tc2bkp (tablecode to bouwkampcode; S. Anderson) - Squared rectangles and squared squares are represented in a concise notation called bouwkampcode. Bouwkampcode without the parentheses and commas is called tablecode. Tablecode is easier to work with in computer programs. It is possible to convert between the two formats. Converting bouwkampcode to tablecode is trivial as it involves replacing parentheses and commas with whitespace, however converting the other way is not trivial and involves constructing the tiling geometrically and then placing the parentheses correctly, which is what tc2bkp does. The other utility programs operate on either bouwkampcode or tablecode, but most produce output in tablecode, so if you require bouwkampcode as the final product you will need this program to convert the tablecode. To use, type tc2bkp followed by the bouwkampcode file.

  2. bk2pss (bouwkampcode to postscript; S. Anderson) - converts bouwkampcodes (or tablecodes) into postscript booklets. You have a choice of 1, 6, 12 or 20 tilings per page. While one can construct a tiling from bouwkampcode by hand, it is convenient to let the computer produce the graphics. To use, just type the program name, you will be prompted for the number of tilings per page, and an input file.
  3. bc2latex (for converting bouwkampcodes to LaTex) use Armin Singer's (see below) linux/unix bc2latex . Usage example ; cat spss.txt | ./bc2latex > latex.txt.
  4. tc2tex (for converting tablecode to LaTex) use Lorenz Milla's, (see below) linux/unix/Windows tc2tex . Usage example : tc2tex input.txt , Windows users can drag and drop the input text file onto tc2tex.exe, reads only the FIRST line from the text file and creates a LaTeX-file "squares.tex".
  5. bc2mp (for converting bouwkampcodes to Metapost) use Armin Singer's linux/unix bc2mp (see below). Usage example ; cat spss.txt | ./bc2mp > metapost.txt.
  6. bk2all (bouwkampcode to all; S. Anderson) - simple squared squares and squared rectangles can be oriented in 8 different ways, usually only one 'canonical' orientation is chosen (with the largest corner square at the top left, and the larger of the two squares adjacent to it on the top). If you want all 8 tablecodes of a particular dissection, use this program to generate them. This program will operate on compounds but does not produce compound isomers, only the whole tiling is reoriented, not any included smaller dissections (the 'trivial' isomers - not the compound isomers). To use, type the program name followed the bouwkampcode filename.
  7. bk2cs & findcpss (bk2cs - bouwkampcode to compound/simple; S. Anderson, findcpss- finds CPSSs ; A. Singer) - In the study of squared squares and squared rectangles, there are 3 important categories for dissections into squares;
    1. A dissection into squares is either a square dissection or a rectangle dissection [a rectangle can be a square, but we mean non-square rectangle], (there are other kinds such as squared hexagons but they dont concern us here)
    2. A dissection is either perfect (every square is a different size) or imperfect (some squares are the same size), and;
    3. A dissection is either simple or compound. A simple dissection does not contain a smaller squared rectangle or squared square, while a compound dissection does. Determining if a dissection is square/rectangular or perfect/imperfect is easy to program and can be done as the dissections are generated. Determining if a dissection is simple or compound is not a trivial operation, although it is easy to spot the difference by eye, it not so easy to program a computer to do so, and to do it efficiently requires some ingenuity. In the theory of squared rectangles 3-connected planar graphs with a identified edge (c-nets) produce simple tilings, and 2-connected graphs produce compound tilings. This is generally true, but there are exceptions, it is possible for c-nets to produce compounds in rare circumstances. In the higher orders what is rare at lower orders becomes more frequent and a means of separating simples from compounds is necessary, particularly if one is interested in enumerating the exact number of tilings of each kind for a given order of tilings.
    bk2cs is a program that inputs bouwkampcodes or tablecodes and separates them into 2 files, simple and compound. To use, type the program name, bk2cs followed by a bouwkampcode filename. Armin Singer (see below) has also written a linux/unix filter program findcpss to select CPSS's from a bouwkampcode listing. Usage ; cat pss.txt | ./findcpss > cpss.txt
  8. bk2cpss (bouwkampcode to CPSS; S Anderson) - If one substitutes a squared square into the elements of that or another squared square, and scales both so that all squares are integers, then a new squared square is the result. If this is applied to a bouwkampcode (or tablecode) listing, and if any resulting imperfects are filtered out then a new collection of CPSSs is the result. Starting with a single PSS, an unlimited supply of CPSSs can be created by performing this operation iteratively. As the smallest PSS (21 : 112 AJD) has 21 squares, performing this operation creates a CPSS of order 41 (one square is lost to become the container for the included square, so these varieties of CPSS start at order 41. SISSs with a single imperfection can also be used to create CPSSs, these SISSs start at order 22. To use, type the program name, bk2cpss followed by a bouwkampcode filename.
  9. bk2ism & findflips (bk2ism - bouwkampcode to isomers; S. Anderson, findflips; A. Singer) - if a dissection of a certain size squared square or rectangle can be done in more than one way (not counting the 8 trivial 'isomers' produced by bk2all) using the same set of squares, then the different dissections are called isomers. This program takes sorted bouwkampcode/tablecode and finds any isomers. As with bk2all the program will operate on compounds but does not produce compound isomers. Isomers had an important role to play in the history of squaring the square, they also make good puzzles. To use, type the program name, bk2ism followed by a bouwkampcode filename. bk2ism has been designed to work for perfects only, Armin Singer (see below) has also written a linux/unix program findflips to identify isomers in a bouwkampcode listing. It works for both perfects and imperfects. Usage ; cat spss.txt | ./findflips > isomers.txt
  10. bk2mb (bouwkampcode to maximum square not on the boundary; S. Anderson) - If one looks at squared squares and squared rectangles it appears that the largest square is always in a corner. In fact there are rare exceptions, it is possible for the largest square not to touch the boundary of the tiling at all. This program searches bouwkampcode/tablecode and finds those particular dissections.
  11. bk2x & findcross (bouwkampcode to crossed square; S. Anderson, findcross - finds crossed squares; A Singer) - A cross in a squared square or squared rectangle occurs where 4 squares meet at a point. In compound imperfect tilings (such as a bathroom floor with tiles all the same size) this is the norm and is completely unremarkable, however in simple and compound perfect tilings it is a very rare event. This program searches bouwkampcode/tablecode and finds squared rectangles and squared squares with crosses. To use, type the program name, bk2x followed by a bouwkampcode filename. Armin Singer (see below) has also produced findcross which performs the same task. Usage; cat spss.txt | ./findcross > crosses.txt
  12. bk2sss (bouwkampcode to squared squares squared; S. Anderson/Stijn Van Dongen) - If one takes a squared square, shrinks it and places copies inside each square of the squared square, then one can create a 'fractal' squared square. This program inputs bouwkampcode/tablecode and uses postscript code by Stijn Van Dongen to create 'fractal' squared squares in postscript. The postscript can be hand edited to change various parameters, such as reverse colouring and recursion level. Type the program name followed by the bouwkampcode filename.
  13. findnice (another short C program by Armin Singer to search for "nice" SPSS or CPSS). 'Nice' being PSS where the smallest square is as large as possible. Usage; spss.txt | ./findnice > nice.txt These tilings make good 'fractal' squared squares (use bk2sss to create them)
  14. bk2canon (bouwkampcode to canonical tablecode; S. Anderson ) Converts bouwkampcode to canonical bouwkampcode (in tablecode form). A squared square or squared rectangle can be rotated and reflected in 8 ways. Each of the 8 ways has a different bouwkampcode. One of those 8 codes is the canonical code of that tiling. For perfect squarings it is the code with the largest corner element in the top left square, and the larger of the 2 elements adjacent to it on it's right. For imperfect squarings the same rule applies but further elements of the 8 codes may need to be compared, element by element, the canonical code is the largest code lexicographically speaking, based on numerical comparison of corresponding elements in the canonical code.

Stuart's programs are written in standard C++ and dont require any special libraries. In Linux, they compile with the gnu compiler at the commandline, for example;
g++ -O3 -Wall bk2all.cpp -o bk2all
In uni/linux move the executables to /usr/bin directory; e.g.
sudo mv bk2all /usr/bin
so the program(s) can be called from anywhere on the computer.

In Windows, Stuart's programs have been compiled with the MinGW C++ compiler, available from here. the following example creates a standalone windows binary;
g++ -Wall -O4 -static bk2all.cpp -o bk2all

All Stuart Anderson's programs are in the zip files; bkutil.zip and bkutilwin.zip. bkutilwin.zip has source code for Windows, along with compiled executables, and bkutil.zip has source code for Linux/Mac. The same source code is now used in both. Source code for Microsoft Visual C++ is no longer supplied, as this compiler required different timing code and executables compiled on WinXP would not run on Windows 7, whereas MinGW compiled executables run on both. Armin Singer's programs are in the squaredance package.

If you are using Windows, the UnxUtils is a very good package of general unix/linux commandline utilities, converted to run as windows executables. Great for sorting and sifting data (like large collections of bouwkampcode files).

Armin Singer's Squaredance and Bouwkampcode Utilities

Armin Singer has produced squaredance to display simple perfect squared squares as a slideshow along with his own collection of Bouwkampcode Utilities. Designed for Xwindows (linux, unix). On linux, "tar xzf squaredance-0.9.tgz" will unpack the package and put its files into a subdirectory named squaredance-0.9. Invoking "make" in this directory should produce the squaredance executable. You may need the xorg libraries and the symlinks, headers, and object files needed to compile and link programs which use the standard C library. In ubuntu these can be installed with sudo apt-get install xorg-dev libc6-dev .

The squaredance package will show you simple perfect squared squares using XVideo. Most parts of it are taken form Open Source (xorg,tvtime). Only a few things have been added by asi AT equicon.de. There is no fancy GUI but just the things needed to enjoy the show. But there are some useful utilities to deal with lists of Bouwkamp Codes (suitable for both the table representation and the traditional form).

Note that BIGLIST.txt and 00TABLE.txt have a couple of errors : Dissection 29-1080I is a CPSS (not a SPSS) and 29-1081A is a SPSS (not a CPSS), other files on this page are more up to date

By default, the squaredance executable uses spss.txt and a delay of 1000ms between frames. Please refer to main.cpp for supported options and/or just try ./squaredance --help Enjoy it, but do not fight against minor strange effects. (varying line width, interfering colors etc.)

Lorenz Milla's tc2tex

tc2tex - written by Lorenz Milla, Germany - April 2012 - Version 1.0.
Draws a rectangle (or square), dissected into squares;
Requires one argument: the name of the input text file.
usage example: tc2tex input.txt
Windows users can drag and drop the input text file onto tc2tex.exe.
Reads in the tablecode from the first line of the input file, for example:
21 112 112 50 35 27 8 19 15 17 11 6 24 29 25 9 2 7 18 16 42 4 37 33
Reads only the FIRST line from the text file, and only in this format.
Creates a LaTeX-file "squares.tex".

Richard Parris windisc program

Windisc displays squared rectangles and their associated c-nets (WinXP)

See Richard Parris 'peanut software homepage' for a range of maths programs and his windisc page for a copy of that software.

To use windisc to view squared rectangles and c-nets, start the program, select Windows -> graphs, then select File -> New -> Squared Rectangle. Some of the viewing parameters can be edited under View -> Squared Rectangles.

Richard Parris windisc program