Dominoes: Difference between revisions
m
different source for formula
m (different source for formula) |
|||
Line 202:
</pre>
===Extra credit task ===
<lang julia>""" From https://
The number of ways to cover an m X n rectangle with m * n / 2 dominoes, calculated
independently by Temperley & Fisher (1961) and Kasteleyn (1961), is given by
"""
function dominotilingcount(m, n)
return BigInt(floor(prod([prod(
[abs(big"2.0" * cospi(j / (m + 1)) + 2 * im * cospi(k / (n + 1))) for k in 1:n])
for
)))
end
Line 225 ⟶ 224:
</lang>{{out}}
<pre>
Arrangements ignoring values:
Permutations of 28 dominos: 304888344611713860501504000000
Permuted arrangements ignoring flipping dominos:
Possible flip configurations: 268435456
Possible permuted arrangements with flips:
</pre>
|