ArticleslgStudy

computer science

Wang tile

Wang tile is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Wang tile rather than just read about it. In short: Wang tiles (or Wang dominoes), first proposed by mathematician, logician, and philosopher Hao Wang in 1961, is a class of formal systems. They are modeled visually by square tiles with a color on each side.

Wang tile — main illustration
Wang tile — illustration

Key takeaways

  • Wang tile belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Wang tile to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Wang tile from memory before moving on to harder problems.

Reference excerpt

Wang tiles (or Wang dominoes), first proposed by mathematician, logician, and philosopher Hao Wang in 1961, is a class of formal systems. They are modeled visually by square tiles with a color on each side. A set of such tiles is selected, and copies of the tiles are arranged side by side with matching colors, without rotating or reflecting them. The basic question about a set of Wang tiles is whether it can tile the plane or not, i.e., whether an entire infinite plane can be filled this way. The next question is whether this can be done in a periodic pattern.

Domino problem

In 1961, Wang conjectured that if a finite set of Wang tiles can tile the plane, then there also exists a periodic tiling, which, mathematically, is a tiling that is invariant under translations by vectors in a 2-dimensional lattice. This can be likened to the periodic tiling in a wallpaper pattern, where the overall pattern is a repetition of some smaller pattern. He also observed that this conjecture would imply the existence of an algorithm to decide whether a given finite set of Wang tiles can tile the plane. The idea of constraining adjacent tiles to match each other occurs in the game of dominoes, so Wang tiles are also known as Wang dominoes. The algorithmic problem of determining whether a tile set can tile the plane became known as the domino problem. According to Wang's student, Robert Berger,

The Domino Problem deals with the class of all domino sets. It consists of deciding, for each domino set, whether or not it is solvable. We say that the Domino Problem is decidable or undecidable according to whether there exists or does not exist an algorithm which, given the specifications of an arbitrary domino set, will decide whether or not the set is solvable.

In other words, the domino problem asks whether there is an effective procedure that correctly settles the problem for all given domino sets. In 1966, Berger solved the domino problem in the negative. He proved that no algorithm for the problem can exist, by showing how to translate any Turing machine into a set of Wang tiles that tiles the plane if and only if the Turing machine does not halt. The undecidability of the halting problem (the problem of testing whether a Turing machine eventually halts) then implies the undecidability of Wang's tiling problem.

Aperiodic sets of tiles

Combining Berger's undecidability result with Wang's observation shows that there must exist a finite set of Wang tiles that tiles the plane, but only aperiodically. 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 conjectured that smaller sets would work, including subsets of his set, and in his unpublished Ph.D. thesis, he reduced the number of tiles to 104. In later years, ever smaller sets were found. For example, a set of 13 aperiodic tiles was published by Karel Culik II in 1996. The smallest set of aperiodic tiles was discovered by Emmanuel Jeandel and Michael Rao in 2015, with 11 tiles and 4 colors. They used an exhaustive computer search to prove that 10 tiles or 3 colors are insufficient to force aperiodicity.

Generalizations Wang tiles can be generalized in various ways, all of which are also undecidable in the above sense. For example, Wang cubes are equal-sized cubes with colored faces, and side colors can be matched on any polygonal tessellation. Culik and Kari have demonstrated aperiodic sets of Wang cubes. Winfree et al. have demonstrated the feasibility of creating molecular "tiles" made from DNA (deoxyribonucleic acid) that can act as Wang tiles. Mittal et al. have shown that these tiles can also be composed of peptide nucleic acid (PNA), a stable artificial mimic of DNA.

Applications Wang tiles have been used for procedural generation of textures, heightfields, and other large and nonrepeating bi-dimensional data sets; a small set of precomputed or hand-made source tiles can be assembled very cheaply without too obvious repetitions and periodicity. In this case, traditional aperiodic tilings would show their very regular structure; much less constrained sets that guarantee at least two tile choices for any two given side colors are common because tileability is easily ensured and each tile can be selected pseudorandomly. Wang tiles have also been used in cellular automata theory decidability proofs.

In popular culture The short story "Wang's Carpets", later expanded to the novel Diaspora, by Greg Egan, postulates a universe, complete with resident organisms and intelligent beings, embodied as Wang tiles implemented by patterns of complex molecules.

See also Edge-matching puzzle

References

Further reading Grünbaum, Branko; Shephard, G. C. (1987), Tilings and Patterns, New York: W. H. Freeman, ISBN 0-7167-1193-1.

External links Steven Dutch's page including many pictures of aperiodic tilings Animated demonstration of a naïve Wang tiling method - requires Javascript and HTML5

Illustrations

Wang tile: This set of 11 Wang tiles will tile the plane but only aperiodically.
This set of 11 Wang tiles will tile the plane but only aperiodically.
Wang tile: Example of Wang tessellation with 13 tiles.
Example of Wang tessellation with 13 tiles.
Wang tile: Wang tiles made monochromatic by replacing edges of each quadrant with a shape corresponding on its color – this set is isomorphic to Jeandel and Rao's minimal set above
Wang tiles made monochromatic by replacing edges of each quadrant with a shape corresponding on its color – this set is isomorphic to Jeandel and Rao's minimal set above

Worked examples

Example 1 — a first encounter with Wang tile

Start with the simplest possible case. Write down what Wang tile claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Wang tile before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Wang tile ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Wang tile

In research
Wang tile appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Wang tile in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Wang tile is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1961 introductions, Aperiodic tilings, Euclidean tilings, so understanding it makes those chapters shorter.
In everyday life
Look for Wang tile outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Wang tile in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Wang tile means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Wang tile out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Wang tile in simple terms?

Wang tiles (or Wang dominoes), first proposed by mathematician, logician, and philosopher Hao Wang in 1961, is a class of formal systems. They are modeled visually by square tiles with a color on each side.

Why does Wang tile matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Wang tile?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Wang tile.

Tags

  • 1961 introductions
  • Aperiodic tilings
  • Euclidean tilings
  • Theory of computation
  • Undecidable problems

Keep exploring