In how many ways can you tile a 3xn rectangle with 2x1 dominoes?

此生再无相见时 提交于 2019-12-05 06:31:50

You can solve this by using dynamic programming. Check this for a possible solution.

Just an explicit solution to the equations given implicitly in taskinoor's answer:

Or

f[n]=((1 + (-1)^n)*((2 - Sqrt[3])^(n/2)*(-1 + Sqrt[3]) + 
     (1 + Sqrt[3])* (2 + Sqrt[3])^(n/2)))/(4*Sqrt[3]) 

if anyone cares.

Let's show 10 values (for odd n there are no solutions) {n,f[n]}:

{6, 41.},   
{12, 2131.},   
{18, 110771.},   
{24, 5.75796*10^6},   
{30, 2.99303*10^8},   
{36, 1.5558*10^10}, 
{42, 8.08717*10^11},  
{48, 4.20377*10^13}, 
{54, 2.18515*10^15}, 
{60, 1.13586*10^17}

Just a note on how to get the explicit solution formula, the trick is to write it down recurrence as matrix multiplication, and then use the eigenvalue formula for nth power of a matrix. For the recursion above, the equation is

(not available)

You can see the four eigenvalues show up in the belisarius' explicit formula

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!