Downloads
"Among scientists are: collectors, classifiers, and compulsive tidiers-up."
- Sir Peter Medawar, The Art of the Soluble
- Bouwkamp Codes(zipped txt)
- Catalogues of Squared Rectangles
- Catalogues of Squared Squares
- Catalogues of Right Isosceles Triangle Tilings
- Catalogues of Equilateral Triangle Tilings
- Software
- Stuart Anderson's squared square finder (sqfind) and Bouwkampcoder (sqt) 2012. (Linux, Mac and Windows XP, Windows 7)
- David Moews graph.c, (squared rectangle generator) (Linux)
- Stuart Anderson's ssh.exe, (squared square hunter) (WinXP, Vista, Win7, wine 2003)
- Stuart Anderson Bouwkampcode Utilities (Windows, linux, Mac?)
- Armin Singer's Squaredance and Bouwkampcode Utilities (Linux)
- Lorenz Milla's tc2tex Bouwkampcode Utility (Linux/Windows)
- Richard Parris's windisc, (displays squared rectangle & squares and their c-nets) (WinXP)
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.
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.
The extra bouwkampcode fields;
- The order, height and width are usually the first three fields, but are not always included in the main bouwkampcode itself, as they are not parenthesised, but are often included in the extra fields.
- The initials of the author/discoverer (3 uppercase alpha characters) eg , AJW, CJB, JDS.
- The year of discovery.
- A unique SPSS ID. For SPSS the ID is the size concatenated with an uppercase alphabet string representing the position of that SPSS in the sorted listing of SPSSs of that size, of the same order. If there is only one square of that size the alphabet string is A, if it is the second square of that size its string is B and so on. The alphabet string of the 27th square of a given size is AA, 28th is AB, and so on. For example, the 27th simple square perfect square of order 28 of size 1068 in tablecode (see below) with ID, author and year ;
29 1068 1068 615 453 186 267 193 87 68 90 153 24 129 81 19 49 106 27 63 348 76 45 300 260 100 15 10 35 25 60 160 * 1068AA A&P 2010
- A unique CPSS ID. For CPSS the ID is the size concatenated with an lowercase alphabet string representing the position of that CPSS in the sorted listing of CPSSs of that size, of the same order. A CPSS ID also has a single field giving the number of isomers. Each isomer CPSS can be uniquely identified by using an alternate field composed of two numbers and a separator mark, giving the position of that CPSS in the listing of its isomer CPSSs. For example;
24 175 175 (81,38,56)(20,18)(3,16,55)(14,5,1)(4)(9)(39)(51,30)(29,31,64)(43,8)(35,2)(33) * 175a THW (4) 1948 or
24 175 175 (81,38,56)(20,18)(3,16,55)(14,5,1)(4)(9)(39)(51,30)(29,31,64)(43,8)(35,2)(33) * 175a THW (1/4) 1948
- SISS are currently unnamed but could also be given a unique ID, some combination of size and an alphanumeric string.
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;
- when each isomer comprises two squares and two squared rectangles, the two squares are in opposite corners of the canonical representative (example: CPSS 28:1015b);
- when one or more isomers include two rectangles with a shared corner element, one of those isomers is the canonical representative (example: CPSS 31:1320a).
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
SPSS Order 21 (Complete)
- (1) SPSSs Order 21, (5k Pdf)
- SPSS bouwkampcode Order 21,
- SPSS tablecode Order 21,
SPSSs Order 22 (Complete)
- (8) SPSSs Order 22, (14k Pdf)
- SPSSs bouwkampcode Order 22,
- SPSSs tablecode Order 22,
SPSSs Order 23 (Complete)
- (12) SPSSs Order 23, (19k Pdf)
- SPSSs bouwkampcode Order 23,
- SPSSs tablecode Order 23,
SPSSs Order 24 (Complete)
- (26) SPSSs Order 24, (39k Pdf)
- SPSSs bouwkampcode Order 24,
- SPSSs tablecode Order 24,
SPSSs Order 25 (Complete)
- (160) SPSSs Order 25, (220k Pdf)
- SPSSs bouwkampcode Order 25,
- SPSSs tablecode Order 25,
SPSSs Order 26 (Complete)
- (441) SPSSs Order 26, (619k Pdf)
- SPSSs bouwkampcode Order 26,
- SPSSs tablecode Order 26,
SPSSs Order 27 (Complete)
- (1152) SPSSs Order 27, (1.6M Pdf)
- SPSSs bouwkampcode Order 27,
- SPSSs tablecode Order 27,
SPSSs Order 28 (Complete)
- (3001) SPSSs Order 28, (4.4M Pdf)
- SPSSs bouwkampcode Order 28,
- SPSSs tablecode Order 28,
SPSSs Order 29 (Complete)
- (7901) SPSSs Order 29, (11.1M Pdf)
- SPSSs bouwkampcode Order 29,
- SPSSs tablecode Order 29,
SPSSs Order 30
- (13211) SPSSs Order 30, (19.9M Pdf) incomplete
- SPSSs bouwkampcode Order 30, incomplete
- SPSSs tablecode Order 30, incomplete
SPSSs Order 31
- (27352) SPSSs Order 31, (25.3M Pdf) incomplete
- SPSSs bouwkampcode Order 31, incomplete
- SPSSs tablecode Order 31, incomplete
SPSSs Order 32
- (62905) SPSSs Order 32, (11.4M Postscript) incomplete
- SPSSs bouwkampcode Order 32, incomplete
- SPSSs tablecode Order 32, incomplete
SPSSs Order 33
- (142886) SPSSs Order 33, (8M Postscript zipped) incomplete
- SPSSs bouwkampcode Order 33 (9.2M zipped), incomplete
- SPSSs tablecode Order 33 (8.2M zipped), incomplete
SPSSs Order 34
- (9929) SPSSs Order 34, (16.2M Pdf) incomplete
- SPSSs bouwkampcode Order 34 (1.8M), incomplete
- SPSSs tablecode Order 34 (1.6M), incomplete
SPSSs Order 35
- (21856) SPSSs Order 35, (7.7M Pdf) incomplete
- SPSSs bouwkampcode Order 35 (4.2M), incomplete
- SPSSs tablecode Order 35 (3.8M), incomplete
SPSSs Order 36
- (47029) SPSSs Order 36, (3.7M postscript zipped) incomplete
- SPSSs bouwkampcode Order 36 (9.4M), incomplete
- SPSSs tablecode Order 36 (8.5M), incomplete
CPSSs Order 24 (Complete)
- (1) CPSS Order 24 Pdf
- CPSSs Order 24 isomers (4) Pdf
- CPSSs tablecode Order 24 (discoverer).
- CPSSs Order 24 isomer bouwkampcodes.
CPSSs Order 25 (Complete)
- (2) CPSSs Order 25 Pdf
- CPSSs Order 25 isomers (12) Pdf
- CPSSs tablecode Order 25 (discoverer).
- CPSSs Order 25 isomer bouwkampcodes.
CPSSs Order 26 (Complete)
- (16) CPSSs Order 26 Pdf
- CPSSs Order 26 isomers (100) Pdf
- CPSSs tablecode Order 26 (discoverer).
- CPSSs Order 26 isomer bouwkampcodes.
CPSSs Order 27 (Complete)
- (46) CPSSs Order 27 Pdf
- CPSSs Order 27 isomers (220) Pdf
- CPSSs tablecode Order 27 (discoverer).
- CPSSs Order 27 isomer bouwkampcodes.
CPSSs Order 28 (Complete)
- (143) CPSSs Order 28 Pdf
- CPSSs Order 28 isomers (948) Pdf
- CPSSs tablecode Order 28 (discoverer).
- CPSSs Order 28 isomer bouwkampcodes.
CPSSs Order 29 (Complete)
- (412) CPSSs Order 29 Pdf
- CPSSs Order 29 isomers (2308) Pdf
- CPSSs tablecode Order 29 (discoverer).
- CPSSs Order 29 isomer bouwkampcodes.
- (227) CPSSs Order 30, PDFs
- (106) CPSSs Order 31, PDFs
- (135) CPSSs Order 32, PDFs
- (369) CPSSs Order 33, PDFs
- (180) CPSSs Order 34, PDFs
- (14) CPSSs Order 35, PDFs
- (230) CPSSs Order 36, PDFs
- (8) CPSSs Order 37, PDFs
- (1214) CPSSs Order 38, PDFs
- (16) CPSSs Order 39, PDFs
- (5188) CPSSs Order 40, PDFs
- (31) CPSSs Order 41, PDFs
- (3317) CPSSs Order 42, PDFs
- (5213) CPSSs Order 43, PDFs
- (415) CPSSs Order 44, PDFs
- (413) CPSSs Order 45, PDFs
- (1132) CPSSs Order 46, PDFs
- (2603) CPSSs Order 47, PDFs
- (5015) CPSSs Order 48, PDFs
- (9400) CPSSs Order 49, PDFs
- (4033) CPSSs Order 50, PDFs
- (5650) CPSSs Order 51, PDFs
- (8896) CPSSs Order 52, PDFs
- (5727) CPSSs Order 53, PDFs
- (7190) CPSSs Order 54, PDFs
- (7490) CPSS Order 55, PDFs
- (7605) CPSSs Order 56, PDFs
- (6323) CPSSs Order 57, PDFs
- (4587) CPSS Order 58, PDFs
- (2501) CPSS Order 59, PDFs
- (66) CPSS Order 60, PDFs
- (1) CPSS Order 86, PDFs
The number of Simple Imperfect Squared Squares (SISSs) by Order,
in bouwkampcodes & pdf (orders 13 - 24 only) & postscript (orders 25 - 29 only); COMPLETE
Tiling Catalogues of Isosceles Right Triangled Squares
Primitive Perfects Catalogues
- pdf of PPIRTSs Order 11 (1 tiling) 3.2 Kb
- pdf of PPIRTSs Order 12 (3 tilings) 5.0 Kb
- pdf of PPIRTSs Order 13 (13 tiling) 14.1 Kb
- pdf of PPIRTSs Order 14 (38 tilings) 36.9 Kb
- pdf of PPIRTSs Order 15 (131 tilings) 128.9 Kb
- pdf of PPIRTSs Order 16 (486 tilings) 484.5 Kb
- pdf of PPIRTSs Order 17 (1187 tilings) 1.2 Mb
- pdf of PPIRTSs Order 18 (3027 tilings) 3.1 Mb
- pdf of PPIRTSs Order 19 (8141 tilings) 8.6 Mb
- pdf A of PPIRTSs Order 20 (7506 tilings) 8.1 Mb
- pdf B of PPIRTSs Order 20 (6598 tilings) 7.1 Mb
Non-ultraperfect Catalogues
- pdf of NPIRTSs Order 7 (2 tilings) 3.8 Kb
- pdf of NPIRTSs Order 8 (4 tilings) 5.4 Kb
- pdf of NPIRTSs Order 9 (23 tiling) 20.6 Kb
- pdf of NPIRTSs Order 10 (101 tilings) 86.2 Kb
- pdf of NPIRTSs Order 11 (354 tilings) 305.5 Kb
- pdf of NPIRTSs Order 12 (1326 tilings) 1.1 Mb
Derivative Ultraperfects Catalogues
- pdf of DUIRTSs Order 15 (4 tilings) 10 Kb
- pdf of DUIRTSs Order 16 (74 tilings) 87 Kb
- pdf of DUIRTSs Order 17 (342 tilings) 388 Kb
- pdf of DUIRTSs Order 18 (1841 tilings) 2.1 Mb
Simple Primitive Imperfects Catalogues
- pdf of SPIIRTSs Order 2 (1 tiling) 2.9 Kb
- pdf of SPIIRTSs Order 8 (2 tilings) 3.8 Kb
- pdf of SPIIRTSs Order 9 (1 tiling) 3.1 Kb
- pdf of SPIIRTSs Order 10 (10 tilings) 10.3 Kb
- pdf of SPIIRTSs Order 11 (37 tilings) 32.8 Kb
- pdf of SPIIRTSs Order 12 (145 tilings) 125.0 Kb
- pdf of SPIIRTSs Order 13 (423 tilings) 376.4 Kb
- pdf of SPIIRTSs Order 14 (966 tilings) 891.0 Kb
Tiling Catalogues of Equilateral Triangled Triangles by Order
All (imperfect & Perfect) Equilateral Triangled Triangles (ETTs)
- pdf of ETTs Order 4 (1 tiling) (without element sizes showing)1 Kb
- pdf of ETTs Order 6 (1 tiling) (without element sizes showing)1 Kb
- pdf of ETTs Order 7 (2 tilings) (without element sizes showing)2 Kb
- pdf of ETTs Order 8 (3 tilings) (without element sizes showing)2 Kb
- pdf of ETTs Order 9 (8 tilings) (without element sizes showing)5 Kb
- pdf of ETTs Order 10 (20 tilings) (without element sizes showing)11 Kb
- pdf of ETTs Order 11 (55 tilings) (without element sizes showing)31 Kb
- pdf of ETTs Order 12 (161 tilings) (without element sizes showing)94 Kb
- pdf of ETTs Order 13 (478 tilings) (without element sizes showing)286 Kb
- pdf of ETTs Order 14 (1496 tilings) (without element sizes showing)921 Kb
- pdf of ETTs Order 15 (4804 tilings) (without element sizes showing)3.0 Mb
- pdf of ETTs Order 16 (15589 tilings) (without element sizes showing)10.1 Mb
Catalogues of Perfect Equilateral Triangle Tilings (PETTs)
- pdf of PETTs Order 15 (2 tilings) (with element sizes showing) 9.4 Kb
- pdf of PETTs Order 16 (2 tilings) (with element sizes showning) 9.5 Kb
- pdf of PETTs Order 17 (6 tilings) (with element sizes showing) 28 Kb
- pdf of PETTs Order 18 (23 tilings) (with element sizes showing) 104 Kb
- pdf of PETTs Order 19 (64 tilings) (with element sizes showing) 301 Kb
- pdf of PETTs Order 20 (181 tilings) (without element sizes showing) 139 Kb
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.
- 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.
- 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.
- bc2latex (for converting bouwkampcodes to LaTex) use Armin Singer's (see below) linux/unix bc2latex . Usage example ; cat spss.txt | ./bc2latex > latex.txt.
- 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".
- bc2mp (for converting bouwkampcodes to Metapost) use Armin Singer's linux/unix bc2mp (see below). Usage example ; cat spss.txt | ./bc2mp > metapost.txt.
- 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.
- 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;
- 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)
- A dissection is either perfect (every square is a different size) or imperfect (some squares are the same size), and;
- 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
- 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.
- 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
- 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.
- 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
- 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.
- 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)
- 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).
- The package contains the following source files:
- barlistuser.hpp ......... just a small C++ interface module
- bars.[ch]pp ............. some code dealing with horizontal "bars", used
to convert Bouwkamp codes to drawable information
- bc2latex.cpp ............ a filter to convert Bouwkamp Codes to LaTeX pictures
- bcsize.[ch]pp ........... tiny module to compute square size
- findcpss.cpp ............ a filter to select CPSS's from a BC list
- not needed to build the squaredance executable
- findcross.cpp ........... a filter to select squares containing a cross
- not needed to build the squaredance executable
- findflips.c ............. a filter to extract equivalent arrangements
- not needed to build the squaredance executable
- findnice.c .............. another short C program to search for "nice" SPSS or CPSS
- not needed to build the squaredance executable
- main.cpp ................ main squaredance module - look at this first
- makefile ................ the package makefile to be used by make(1)
- myxev.c ................. a modified xev.c from the Xorg sources
- squaredance.[ch]pp ...... the squaredance core machinery using xvideoshow.*
- xvideoshow.[ch]pp ....... XVideo code taken from the tvtime source RPM
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.
