7
This is an extension of Fibonacci Domino Tiling. Your goal is to print all 281 ways to tile a 4x6 rectangle with 1x2 and 2x1 dominoes. Fewest bytes wins.
Use the vertical bar | to indicate a space covered by the vertical domino, and an em-dash — (count it as if it were ASCII) or hyphen - for horizontal ones.
Example output: (281 tilings, 1405 lines)
——————
——————
——————
——————
||————
||————
——————
——————
|——|——
|——|——
——————
——————
——||——
——||——
——————
——————
|————|
|————|
——————
——————
——|——|
——|——|
——————
——————
————||
————||
——————
——————
||||——
||||——
——————
——————
|||——|
|||——|
——————
——————
——————
||————
||————
——————
||——||
||——||
——————
——————
|——|||
|——|||
——————
——————
——||||
——||||
——————
——————
——————
|——|——
|——|——
——————
——————
——||——
——||——
——————
||————
||||——
——||——
——————
——||——
||||——
||————
——————
——|——|
|||——|
||————
——————
————||
||——||
||————
——————
||||||
||||||
——————
——————
——————
|————|
|————|
——————
——————
——|——|
——|——|
——————
||————
|||——|
——|——|
——————
————||
|——|||
|——|——
——————
——————
————||
————||
——————
||————
||——||
————||
——————
|——|——
|——|||
————||
——————
——||——
——||||
————||
——————
————||
——||||
——||——
——————
||||——
||||||
————||
——————
——————
||||——
||||——
——————
||——||
||||||
——||——
——————
——||||
||||||
||————
——————
——————
|||——|
|||——|
——————
——————
——————
||————
||————
||————
||————
||————
||————
|——|——
|——|——
||————
||————
——||——
——||——
||————
||————
|————|
|————|
||————
||————
——|——|
——|——|
||————
||————
————||
————||
||————
||————
||||——
||||——
||————
||————
|||——|
|||——|
||————
||————
——————
||——||
||——||
——————
||——||
||——||
||————
||————
|——|||
|——|||
||————
||————
——||||
——||||
||————
||————
——————
|——|||
|——|||
——————
——————
——||||
——||||
——————
||————
||||||
——||||
——————
——||——
||||||
||——||
——————
————||
||||||
||||——
——————
||||||
||||||
||————
||————
——————
——————
|——|——
|——|——
||————
||————
|——|——
|——|——
|——|——
|——|——
|——|——
|——|——
——||——
——||——
|——|——
|——|——
|————|
|————|
|——|——
|——|——
——|——|
——|——|
|——|——
|——|——
————||
————||
|——|——
|——|——
||||——
||||——
|——|——
|——|——
|||——|
|||——|
|——|——
|——|——
||——||
||——||
|——|——
|——|——
|——|||
|——|||
|——|——
|——|——
——||||
——||||
|——|——
|——|——
||||||
||||||
|——|——
|——|——
——————
——————
——||——
——||——
||————
||————
——||——
——||——
|——|——
|——|——
——||——
——||——
——||——
——||——
——||——
——||——
|————|
|————|
——||——
——||——
——|——|
——|——|
——||——
——||——
————||
————||
——||——
——||——
||||——
||||——
——||——
——||——
|||——|
|||——|
——||——
——||——
——————
||————
||||——
——||——
||——||
||——||
——||——
——||——
|——|||
|——|||
——||——
——||——
——||||
——||||
——||——
——||——
——————
——||——
||||——
||————
||————
||||——
||||——
||————
|——|——
||||——
||||——
|——|——
——||——
||||——
||||——
——||——
|————|
|||——|
||||——
|——|——
——|——|
|||——|
||||——
——||——
————||
||——||
||||——
——||——
||||||
||||||
——||——
——||——
——————
——|——|
|||——|
||————
||————
|||——|
|||——|
||————
——————
————||
||——||
||————
||————
||——||
||——||
||————
|——|——
|——|||
||——||
||————
——||——
——||||
||——||
||————
————||
——||||
||||——
||————
||||——
||||||
||——||
||————
——————
||||||
||||||
——————
||——||
||||||
||||——
||————
|——|||
||||||
||||——
|——|——
——||||
||||||
||||——
——||——
——————
——————
|————|
|————|
||————
||————
|————|
|————|
|——|——
|——|——
|————|
|————|
——||——
——||——
|————|
|————|
|————|
|————|
|————|
|————|
——|——|
——|——|
|————|
|————|
————||
————||
|————|
|————|
||||——
||||——
|————|
|————|
|||——|
|||——|
|————|
|————|
||——||
||——||
|————|
|————|
|——|||
|——|||
|————|
|————|
——||||
——||||
|————|
|————|
||||||
||||||
|————|
|————|
——————
——————
——|——|
——|——|
||————
||————
——|——|
——|——|
|——|——
|——|——
——|——|
——|——|
——||——
——||——
——|——|
——|——|
|————|
|————|
——|——|
——|——|
——|——|
——|——|
——|——|
——|——|
————||
————||
——|——|
——|——|
||||——
||||——
——|——|
——|——|
|||——|
|||——|
——|——|
——|——|
——————
||————
|||——|
——|——|
||——||
||——||
——|——|
——|——|
|——|||
|——|||
——|——|
——|——|
——||||
——||||
——|——|
——|——|
|——|——
||||——
|||——|
|————|
——||——
||||——
|||——|
——|——|
|————|
|||——|
|||——|
|————|
——|——|
|||——|
|||——|
——|——|
————||
||——||
|||——|
——|——|
||||||
||||||
——|——|
——|——|
|————|
||——||
||——||
|————|
——————
————||
|——|||
|——|——
||————
||——||
|——|||
|——|——
|——|——
|——|||
|——|||
|——|——
——||——
——||||
|——|||
|——|——
|————|
|——|||
|——|||
|————|
——|——|
——||||
|——|||
|————|
||||——
||||||
|——|||
|——|——
|||——|
||||||
|——|||
|————|
|——|||
||||||
|||——|
|————|
——||||
||||||
|||——|
——|——|
——————
——————
————||
————||
||————
||————
————||
————||
|——|——
|——|——
————||
————||
——||——
——||——
————||
————||
|————|
|————|
————||
————||
——|——|
——|——|
————||
————||
————||
————||
————||
————||
||||——
||||——
————||
————||
|||——|
|||——|
————||
————||
——————
||————
||——||
————||
||——||
||——||
————||
————||
|——|||
|——|||
————||
————||
——||||
——||||
————||
————||
——————
|——|——
|——|||
————||
——————
——||——
——||||
————||
||————
||||——
——||||
————||
——||——
||||——
||——||
————||
——|——|
|||——|
||——||
————||
————||
||——||
||——||
————||
||||||
||||||
————||
————||
————||
|——|||
|——|||
————||
——————
————||
——||||
——||——
||————
||——||
——||||
——||——
|——|——
|——|||
——||||
——||——
——||——
——||||
——||||
——||——
|————|
|——|||
——||||
——|——|
——|——|
——||||
——||||
——|——|
————||
——||||
——||||
————||
||||——
||||||
——||||
——||——
|||——|
||||||
——||||
——|——|
——————
||||——
||||||
————||
||——||
||||||
——||||
————||
——||||
||||||
||——||
————||
——————
——————
||||——
||||——
||————
||————
||||——
||||——
|——|——
|——|——
||||——
||||——
——||——
——||——
||||——
||||——
|————|
|————|
||||——
||||——
——|——|
——|——|
||||——
||||——
————||
————||
||||——
||||——
||||——
||||——
||||——
||||——
|||——|
|||——|
||||——
||||——
——————
||——||
||||||
——||——
||——||
||——||
||||——
||||——
|——|||
|——|||
||||——
||||——
——||||
——||||
||||——
||||——
——————
——||||
||||||
||————
||————
||||||
||||||
||————
|——|——
||||||
||||||
|——|——
——||——
||||||
||||||
——||——
|————|
||||||
||||||
|————|
——|——|
||||||
||||||
——|——|
————||
||||||
||||||
————||
||||||
||||||
||||——
||||——
——————
——————
|||——|
|||——|
||————
||————
|||——|
|||——|
|——|——
|——|——
|||——|
|||——|
——||——
——||——
|||——|
|||——|
|————|
|————|
|||——|
|||——|
——|——|
——|——|
|||——|
|||——|
————||
————||
|||——|
|||——|
||||——
||||——
|||——|
|||——|
|||——|
|||——|
|||——|
|||——|
||——||
||——||
|||——|
|||——|
|——|||
|——|||
|||——|
|||——|
——||||
——||||
|||——|
|||——|
||||||
||||||
|||——|
|||——|
——————
——————
||——||
||——||
||————
||————
||——||
||——||
|——|——
|——|——
||——||
||——||
——||——
——||——
||——||
||——||
|————|
|————|
||——||
||——||
——|——|
——|——|
||——||
||——||
————||
————||
||——||
||——||
||||——
||||——
||——||
||——||
|||——|
|||——|
||——||
||——||
||——||
||——||
||——||
||——||
|——|||
|——|||
||——||
||——||
——||||
——||||
||——||
||——||
||||||
||||||
||——||
||——||
——————
——————
|——|||
|——|||
||————
||————
|——|||
|——|||
|——|——
|——|——
|——|||
|——|||
——||——
——||——
|——|||
|——|||
|————|
|————|
|——|||
|——|||
——|——|
——|——|
|——|||
|——|||
————||
————||
|——|||
|——|||
||||——
||||——
|——|||
|——|||
|||——|
|||——|
|——|||
|——|||
||——||
||——||
|——|||
|——|||
|——|||
|——|||
|——|||
|——|||
——||||
——||||
|——|||
|——|||
||||||
||||||
|——|||
|——|||
——————
——————
——||||
——||||
||————
||————
——||||
——||||
|——|——
|——|——
——||||
——||||
——||——
——||——
——||||
——||||
|————|
|————|
——||||
——||||
——|——|
——|——|
——||||
——||||
————||
————||
——||||
——||||
||||——
||||——
——||||
——||||
|||——|
|||——|
——||||
——||||
——————
||————
||||||
——||||
||——||
||——||
——||||
——||||
|——|||
|——|||
——||||
——||||
——||||
——||||
——||||
——||||
——————
——||——
||||||
||——||
||————
||||——
||||||
||——||
|——|——
||||——
||||||
|——|||
——||——
||||——
||||||
——||||
|————|
|||——|
||||||
|——|||
——|——|
|||——|
||||||
——||||
————||
||——||
||||||
——||||
||||||
||||||
——||||
——||||
——————
————||
||||||
||||——
||————
||——||
||||||
||||——
|——|——
|——|||
||||||
||||——
——||——
——||||
||||||
||||——
|————|
|——|||
||||||
|||——|
——|——|
——||||
||||||
|||——|
————||
——||||
||||||
||——||
||||——
||||||
||||||
||||——
|||——|
||||||
||||||
|||——|
||——||
||||||
||||||
||——||
|——|||
||||||
||||||
|——|||
——||||
||||||
||||||
——||||
——————
——————
||||||
||||||
||————
||————
||||||
||||||
|——|——
|——|——
||||||
||||||
——||——
——||——
||||||
||||||
|————|
|————|
||||||
||||||
——|——|
——|——|
||||||
||||||
————||
————||
||||||
||||||
||||——
||||——
||||||
||||||
|||——|
|||——|
||||||
||||||
||——||
||——||
||||||
||||||
|——|||
|——|||
||||||
||||||
——||||
——||||
||||||
||||||
||||||
||||||
||||||
||||||
Input
There is no input -- you only have to print 4x6 tilings. In theory, you could hardcode an output, but that would likely take more bytes that producing it.
Output
Print the 281 tilings in any order in the format shown in the example, with each one appearing exactly once. There must be exactly one empty line between tilings. Any other whitespace is OK if it doesn't affect the visible output. Empty lines at the start and end are also OK.
Other requirements
Your code should not be horribly slow; it should produce output within 10 minutes, which should be ample time. Functions to produce or enumerate tilings are disallowed.
In case people are wondering if this is sufficiently distinct from Fibonacci Domino Tiling, I expect the answers to use a different strategies as one can no longer take advantage of the particular Fibonacci structure of 2-by-n domino tilings and them being specified by their top row.
Cool, I wonder if this method would work in general. I see no reason why not. It would be interesting to check it on 5x5 and confirm it returns nothing. BTW, I have though of a massive improvement to my program (same philosophy as my current one, but different implementation) but I have no time to write it today. Don't worry, it will still be about twice as long as yours ;-D – Level River St – 2014-09-20T11:20:06.850
After generating the possible rows and columns dynamically, this approach should work just fine in the general case. The row check makes sure all dashes occur in pairs, the column check does the same for bars. Since a valid row would have to contain an even amount of dashes and a valid column an even amount of bars, it would return nothing for 5x5. – Dennis – 2014-09-20T12:52:11.723
Interesting, the idea of generating and intersecting is clever. I hadn't considered a partial hardcode like this. – xnor – 2014-09-21T00:07:35.473
@xnor: Turns out that generating the rows is even shorter. – Dennis – 2014-09-21T21:44:34.927