Following excerpt from Wikipedia Wang tiles (or Wang dominoes), first proposed by Hao Wang in 1961, are a class of formal systems consisting of equal-sized squares with a color on each edge which can be arranged side by side (on a regular square grid) so that abutting edges of adjacent tiles have the same color; the tiles cannot be rotated or reflected. The following shows an example set of 13 Wang tiles:

The basic question about sets of Wang tiles is proving whether they can tile the plane or not. This means that copies of the tiles can be arranged one by one to fill an infinite plane, without any grid position where no tile in the set can match the side colors of already laid out adjacent tiles. In 1961, Wang proposed an algorithm to take any finite set of tiles and decide whether they tiled the plane. To prove his algorithm worked, he assumed that any set that could tile the plane would be able to tile the plane periodically (with a pattern that repeats, like standard wallpaper). However, in 1966 Robert Berger proved Wang's conjecture was wrong. He presented a set of Wang tiles that could only tile the plane aperiodically. This meant it could fill the plane without holes, but the tiling couldn't be a simple repetition of a finite pattern. This is similar to a Penrose tiling, or the arrangement of atoms in a quasicrystal. Although Berger's original set contained 20,426 tiles, he hypothesized that smaller sets would work, including subsets of his set. In later years, increasingly smaller sets were found. For example, the set of 13 tiles given above is an aperiodic set published by Karel Culik. It can tile the plane, but not periodically. Karel Culik's set of 13 tiles can be transformed into polyomino tiles by replacing the coloured quarter faces and outside edges with a variable edge. Instead of adjacent squares having the same colour, adjacent tiles must have fitting edges. The edges need have no more variability than is required. A binary string can be used to create the different edges corresponding to the different colours a 1 corresponds to a 1 unit extrusion away from the tile a 0 corresponds to a 1 unit intrusion into the tile the tiles have two squares at the beginning and end of each side (otherwise the corners could be pitched off by intrusions meeting at the corners) 8 3 bit possibilities 000 001 010 011 100 101 110 111 these can be paired

as the edges have to interlock 000 001 010 011 100 111 110 101 100 011 only 4 pairs 000 001 111 110

010 101

101 010

110 001

111 000

011 100

corresponds to 4 colours each paired edge corresponds to a variable edge, another possibility is a straight edge, this creates the fifth colour 16 tile 6 colour aperiodic Wang tile set

Each coloured straight line is changed to a corresponding key-lock pair. Keylocks are created by converting a colour value to a tri-bit word and then to a key-lock path using 2 tri-bits, 3^2 = 9 possibilities; 00 01 02 10 11 12 20 21 22 Edge matching for each tri-bit word results in 6 key-lock pairs, ie 6 colors e0 00, key-lock pair with e8 22 - colour 1 top right e1 01, key-lock pair with e5 12 - colour 2 top right e2 02, key-lock pair with self 02 - colour 3 top right e3 10, key-lock pair with e7 21 - colour 4 top right e4 11, key-lock pair with self - colour 5 top right bottom left e5 12, key-lock pair with e1 01 - colour 2 bottom left e6 20, key-lock pair with self 20 - colour 6 bottom left e7 21, key-lock pair with e3 10 - colour 4 bottom left e8 22, key-lock pair with e8 00 - colour 1 bottom left colour 1 e0 T,R; e8 B,L colour 2 e1 T,R; e5 B,L colour 3 e2 T,R,B,L colour 4 e3 T,R; e7 B,L colour 5 e4 T,R,B,L colour 6 e6 T,R,B,L

colour map 1221 3443 4554 6336 4534 6343 3454 3436 5132 4162 5141 3262 2614 2315 2623 1415