1 Introduction
1.1 Previous and related work
2 Optimal placement of dominoes
2.1 The problem
2.2 Domino enumeration
2.2.1 Dominoes in the square
-
n even: \( \quad \xi _0 = 0, \, \xi _2 = 1, \, \xi _4 = 4 \quad \text{ and } \quad \xi _n = \xi _{n-6} + 2 ( n - 2 ) \)
-
n odd: \( \quad \xi _1 = 0, \,\xi _3 = 2, \, \xi _5 = 6 \quad \text{ and } \quad \xi _n = \xi _{n-6} + 2 ( n - 2 ) \)
2.2.2 Dominoes in the diamond
2.2.3 Space occupancy ratio
n | \( \ m = n/2 \ \) | \( \ p = m/3 \ \) | \( \mid {\mathcal {S}}_{n}\mid \) | \( \xi _{n} \) | \(\mid {\mathcal {S}}_{n}\mid / \xi _n \) | \( \mid {\mathcal {D}}_{n}\mid \) | \( \psi _{n} \) | \(\mid {\mathcal {D}}_{n}\mid / \psi _n \) |
---|---|---|---|---|---|---|---|---|
0 | 0 | 0 | 4 | 0 | – | 4 | 0 | – |
1 | 0 | 0 | 9 | 0 | – | 5 | 0 | – |
2 | 1 | 0 | 16 | 1 | 16.000 | 12 | 1 | 12.000 |
3 | 1 | 0 | 25 | 2 | 12.500 | 13 | 1 | 13.000 |
4 | 2 | 0 | 36 | 4 | 9.000 | 24 | 2 | 12.000 |
5 | 2 | 0 | 49 | 6 | 8.167 | 25 | 2 | 12.500 |
6 | 3 | 1 | 64 | 8 | 8.000 | 40 | 5 | 8.000 |
7 | 3 | 1 | 81 | 10 | 8.100 | 41 | 4 | 10.25 |
8 | 4 | 1 | 100 | 13 | 7.692 | 60 | 8 | 7.500 |
9 | 4 | 1 | 121 | 16 | 7.562 | 61 | 7 | 8.714 |
10 | 5 | 1 | 144 | 20 | 7.200 | 84 | 12 | 7.000 |
11 | 5 | 1 | 169 | 24 | 7.042 | 85 | 10 | 8.500 |
12 | 6 | 2 | 196 | 28 | 7.000 | 112 | 16 | 7.000 |
13 | 6 | 2 | 225 | 32 | 7.031 | 113 | 14 | 8.071 |
14 | 7 | 2 | 256 | 37 | 6.919 | 144 | 20 | 7.200 |
15 | 7 | 2 | 289 | 42 | 6.881 | 145 | 19 | 7.632 |
16 | 8 | 2 | 324 | 48 | 6.750 | 180 | 25 | 7.200 |
17 | 8 | 2 | 361 | 54 | 6.685 | 181 | 24 | 7.542 |
18 | 9 | 3 | 400 | 60 | 6.667 | 220 | 32 | 6.875 |
19 | 9 | 3 | 441 | 66 | 6.682 | 221 | 30 | 7.367 |
20 | 10 | 3 | 484 | 73 | 6.630 | 264 | 36 | 7.333 |
21 | 10 | 3 | 529 | 80 | 6.612 | 265 | 37 | 7.162 |
22 | 11 | 3 | 576 | 88 | 6.545 | 312 | 44 | 7.091 |
23 | 11 | 3 | 625 | 96 | 6.510 | 313 | 44 | 7.114 |
24 | 12 | 4 | 676 | 104 | 6.500 | 364 | 53 | 6.868 |
25 | 12 | 4 | 729 | 112 | 6.509 | 365 | 52 | 7.019 |
26 | 13 | 4 | 784 | 121 | 6.479 | 420 | 60 | 7.000 |
27 | 13 | 4 | 841 | 130 | 6.469 | 421 | 61 | 6.902 |
28 | 14 | 4 | 900 | 140 | 6.428 | 480 | 69 | 6.957 |
29 | 14 | 4 | 961 | 150 | 6.407 | 481 | 70 | 6.871 |
3 The design idea
3.1 The basic rule
3.1.1 Test on the square
3.1.2 Test on the diamond
4 Rule enhancements
-
(Option 1) The aim was to reach only stable class I patterns.
-
(Option 2) The aim was to reach preferably patterns with a maximal number of dominoes (max patterns).
-
0, if no neighborhood template matches or there is a gap.
-
1, if exactly one neighborhood template with the reference value 0 matches,
-
2–4, if there are 2–4 neighborhood templates with reference values 0 that match at the same site (x, y). This means that 2–4 tiles are overlapping there.
-
100, if one neighborhood template with the reference value 1 matches. Note that 1-valued pixels are not allowed to overlap. The number 100 was arbitrarily chosen in order to differentiate such a hit from the other.
4.1 Rule option 1: stabilizing the pattern
4.1.1 Test on square
4.1.2 Test on diamond
4.2 Rule option 2: maximizing the number of dominoes
4.2.1 Test with option 2 only
-
Square. The frequency of patterns with \(d=6, 5, 4\) was 96.0%, 4.0%, and 0%. The max patterns with \(d=6\) were stable. The patterns with \(d=5\) were changing between different solutions but did not reach a max pattern because of the limited time. \(t_{\mathrm{avrg}} (d = 6, 5) = 120 ~(3 - 497)\). For averaging, the time of the first appearance of that number of dominoes was used.
-
Diamond. All patterns contained 4 dominoes, the only number possible, and all of them were not stable, changing from one solution to another because no totally overlapping solution exists. The average time of the first appearance of a valid solution was \(t_{avrg} (d = 4) = 59.9\).
4.2.2 Test with option 2 and option 1
-
Square. The frequency of patterns with \(d=6, 5, 4\) was 94.7%, 5.3%, and 0%. All max patterns with \(d=6\) were stable. The patterns with \(d=5\) were changing between different solutions. \(t_{\mathrm{avrg}} (d = 6 , 5) = 135.1 ~(3 - 500)\). For averaging, the time of the first appearance of that number of dominoes was used.
-
Diamond. All patterns contained 4 dominoes, the only number possible, and all of them were not stable, changing from one solution to another because no totally overlapping solution exists. The average time of the first appearance of a valid solution was \(t_{\mathrm{avrg}} (d = 4) = 40.7\).
5 Performance and robustness
5.1 Performance for different field sizes
n | Square | Diamond | ||||||
---|---|---|---|---|---|---|---|---|
\(\mathrm{d}_{\mathrm{max}}\) | \(\hbox {N}_{\mathrm{active}}\) | \(\hbox {t}_{\mathrm{avrg}}\) | \(\hbox {t}_{\mathrm{avrg}}/ \mathrm{N}_{\mathrm{active}}\) | \(\mathrm{d}_{\mathrm{max}}\) | \(\mathrm{N}_{\mathrm{active}}\) | \(\mathrm{t}_{\mathrm{avrg}}\) | \(\hbox {t}_{\mathrm{avrg}}/ \mathrm{N}_{\mathrm{active}}\) | |
2 | 1 | 4 | 0.93 | 0.23 | 1 | 4 | 0.89 | 0.22 |
3 | 2 | 9 | 3.22 | 0.36 | 1 | 5 | 2.4 | 0.48 |
4 | 4 | 16 | 75 | 4.7 | 2 | 12 | 49 | 4.08 |
5 | 6 | 25 | 126 | 5.0 | 2 | 13 | 75 | 5.77 |
6 | 8 | 36 | 986 | 27.4 | 5 | 24 | 60 | 2.5 |
7 | 10 | 49 | 90 | 1.8 | 4 | 25 | 55 | 2.2 |
8 | 13 | 64 | 258 | 4.0 | 8 | 40 | 178 | 4.5 |
9 | 16 | 81 | 375 | 4.6 | 7 | 41 | 84 | 2.1 |
10 | 20 | 100 | 1 185 | 11.9 | 12 | 60 | 2 497 | 41.6 |
11 | 24 | 121 | 2 272 | 18.8 | 10 | 61 | 116 | 1.9 |
12 | 28 | 144 | 8 477 | 58.9 | 16 | 84 | 12 598 | 145.0 |
13 | 32 | 169 | 1 305 | 7.7 | 14 | 85 | 168 | 2.0 |
14 | 37 | 196 | 2 563 | 13.1 | 20 | 112 | 491 | 4.4 |
15 | 42 | 225 | 2 920 | 13.0 | 19 | 113 | 432 | 3.8 |
16 | 48 | 256 | 11 220 | 43.8 | 26 | 144 | 3 348 | 23.3 |
17 | 54 | 289 | 8 790 | 20.0 | 25 | 145 | 14310 | 98.69 |
18 | 60 | 324 | 26 971 | 83.2 | 32 | 180 | 3 802 | 21.12 |