For sci-fi readers that dig aperiodic tiling, Greg Egan wrote a great short story in his book 'Diaspora' about computational wang tiles. http://www.amazon.com/Diaspora-Greg-Egan-ebook/dp/B00E83YOEI (the short story is titled Wang's Carpets, available separately as well, but the whole book is worth buying or checking out from the library).
I hope this is considered on topic. I find fiction, particular that which inspires interest in math/code to always be particularly relevant.
Thanks for posting this! I just read my first Egan book (Permutation City) and was wondering which one to read next.
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.
> It's also possible to allow tile rotation or mirroring. However, this complicates the nature of the edge constraint; with 90-degree rotation, the edge constraints on horizontals must be the same as the edge constraints on verticals. If mirroring (or 180-degree rotation) is allowed, the edge constraints must be internally symmetric. The advantage is that if rotation or mirroring are allowed, the minimum number of tiles needed decreases. (I haven't done the math to explore how far it goes down; somebody should.)
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.)
I'm working on a canvas-based hexagonal grid system capable of implementing algos such as these. If you're interested in developing the idea get in touch: username at gmail.
I hope this is considered on topic. I find fiction, particular that which inspires interest in math/code to always be particularly relevant.