Cody

# Problem 44735. Aztec Diamond domino tilings

Solution 1662307

Submitted on 30 Oct 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
filetext = fileread('AztecDiamond.m'); assert(isempty(strfind(filetext,'eval'))) assert(isempty(strfind(filetext,'assign'))) assert(isempty(strfind(filetext,'echo'))) assert(isempty(strfind(filetext,'switch'))) assert(isempty(strfind(filetext,'regexp')))

2   Fail
d = 1; assert(isequal(AztecDiamond(d),2))

Undefined function or variable 'n'. Error in AztecDiamond (line 2) n = 2^(0.5*n*(n+1)); Error in Test2 (line 2) assert(isequal(AztecDiamond(d),2))

3   Fail
d = 3; assert(isequal(AztecDiamond(d),64))

Undefined function or variable 'n'. Error in AztecDiamond (line 2) n = 2^(0.5*n*(n+1)); Error in Test3 (line 2) assert(isequal(AztecDiamond(d),64))

4   Fail
d = 6; assert(isequal(AztecDiamond(d),2097152))

Undefined function or variable 'n'. Error in AztecDiamond (line 2) n = 2^(0.5*n*(n+1)); Error in Test4 (line 2) assert(isequal(AztecDiamond(d),2097152))

5   Fail
d = 7; assert(isequal(AztecDiamond(d),268435456))

Undefined function or variable 'n'. Error in AztecDiamond (line 2) n = 2^(0.5*n*(n+1)); Error in Test5 (line 2) assert(isequal(AztecDiamond(d),268435456))

6   Fail
d = 9; assert(isequal(log2(AztecDiamond(d)),45))

Undefined function or variable 'n'. Error in AztecDiamond (line 2) n = 2^(0.5*n*(n+1)); Error in Test6 (line 2) assert(isequal(log2(AztecDiamond(d)),45))

7   Fail
d = 12; assert(isequal(log2(AztecDiamond(d)),78))

Undefined function or variable 'n'. Error in AztecDiamond (line 2) n = 2^(0.5*n*(n+1)); Error in Test7 (line 2) assert(isequal(log2(AztecDiamond(d)),78))