I hope this is considered on topic. I find fiction, particular that which inspires interest in math/code to always be particularly relevant.
I thought Permutation City was outstanding. I put the book down several times in awe and to think more about his ideas. It is great when a novel's story is so profound, yet plausible enough, to encourage this.
Permutation City is one of those books that made me feel the same way I did when first trying to understand clever recursive functions in Haskell.
That is of course high praise.
Wang tilings have been used in other areas of computer graphics as well [2], as well as for DNA computing [3].
[1] http://moyix.wordpress.com/2012/04/06/computing-with-tiles/
[2] http://research.microsoft.com/en-us/um/people/cohen/WangFina...
https://github.com/josephg/wangjs
Unfortunately, when you render out a large square of them the results look very repetitive. Herringbone wang tiles work much better.
Unless I'm mistaken, counting the number of tiles needed for a complete set when allowing rotations and reflections comes down to the classic necklace counting problem [1]. In particular, we have exactly 4 'beads' (i.e. edges in this case) and n colors (conveniently called colors in both theories). (Well, wikipedia's notation actually would call these 'bracelets' unless you didn't include mirroring.) Wolfram Alpha [2] gives an enumeration of these numbers for the first few, namely:
2 colors : 6 tiles, 6 w/ mirrors
3 colors: 24 tiles, 21 w/ mirrors
4 colors: 70 tiles, 55 w/ mirrors
5 colors: 165 tiles, 119 w/ mirrors
(Disclaimer: I might have messed up the "with mirrors" numbers.)
[1] http://en.wikipedia.org/wiki/Necklace_(combinatorics) [2] http://www.wolframalpha.com/input/?i=necklace+number