01-Mar-2019 08:05:40 polyomino_multihedral_test: MATLAB version Test polyomino_multihedral, which sets up and solves the linear system associated with a multi-polyomino tiling problem. POLYOMINO_MULTIHEDRAL_TEST01: POLYOMINO_MULTIHEDRAL must solve a multihedral polyomino tiling problem for a 2x4 rectangle. Region R: 1 1 1 1 1 1 1 1 Polyomino N: 1 Polyomino O: 1 1 1 Polyomino P: 0 0 1 1 1 1 VERBOSE: The internal variable "verbose" is set to "true"; Print statements marked "VERBOSE" can be suppressed by setting "verbose" to "false". VERBOSE: POLYOMINO_MULTIHEDRAL: Analyze the problem of tiling a region R using copies, possibly rotated or reflected, of several polyominoes. VERBOSE: Input R_SHAPE has shape (2,4). VERBOSE: Input R_SHAPE is a binary matrix. VERBOSE: Condensed R_SHAPE has shape (2,4). VERBOSE: Input P(1) has shape (2,4). VERBOSE: Input P(1) is a binary matrix. VERBOSE: Condensed P(1) has shape (1,1). VERBOSE: Input P(2) has shape (2,4). VERBOSE: Input P(2) is a binary matrix. VERBOSE: Condensed P(2) has shape (1,3). VERBOSE: Input P(3) has shape (2,4). VERBOSE: Input P(3) is a binary matrix. VERBOSE: Condensed P(3) has shape (2,3). 12x20 system matrix A and right hand side B: 1 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 1 1 0 0 1 0 0 0 0 0 1 1 0 0 1 0 1 1 0 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1 0 1 1 1 0 0 1 0 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0 1 1 1 0 1 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 3 3 3 3 4 4 4 4 4 4 4 4 8 VERBOSE: RREF has determinant = 4 13x20 Row-Reduced Echelon Form system matrix A and right hand side B: 1 0 0 0 0 0 0 0 0-1-1-1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0-1-1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0-1-1 0-1 0 0-1-1 0 0 -1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0-1 0-1 0-1-1-1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0-1 0 0 0-1-1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0-1-1 0 0 0-1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 VERBOSE: Seek binary solutions with exactly 3 nonzeros VERBOSE: System has 10 degrees of freedom. VERBOSE: Augmented Row-Reduced Echelon Form system matrix A and right hand side B: Columns associated with a free variable are headed with a "*" : : : : : : : : : * * * : * * * * * * * 1 0 0 0 0 0 0 0 0-1-1-1 0 0 1 0 1 0 1 0 0 0 1 0 0 0 0 0 0 0 0-1-1 0 0 1 1 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0-1-1 0-1 0 0-1-1 0 0 -1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 0-1 0-1 0-1-1-1 0 0 0 0 0 0 1 0 0 0 0 1 1 0 0-1 0 0 0-1-1 0 0 0 0 0 0 0 1 0 0 0 1 1 0 0-1-1 0 0 0-1 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 VERBOSE: Tried 176 right hands sides, found 4 solutions. 4 binary solutions were found. Binary solution vectors x: 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 Check Loo residuals ||Ax-b||: All solutions had zero residual. Check Loo residuals ||Ax-b||: All solutions had zero residual. Translate each correct solution into a tiling: Tiling based on solution 1 Numeric Labels 2 2 2 3 1 3 3 3 Tiling based on solution 1 "Colors" 2 2 2 3 1 3 3 3 Tiling based on solution 2 Numeric Labels 3 3 3 1 3 2 2 2 Tiling based on solution 2 "Colors" 3 3 3 1 3 2 2 2 Tiling based on solution 3 Numeric Labels 3 2 2 2 3 3 3 1 Tiling based on solution 3 "Colors" 3 2 2 2 3 3 3 1 Tiling based on solution 4 Numeric Labels 1 3 3 3 2 2 2 3 Tiling based on solution 4 "Colors" 1 3 3 3 2 2 2 3 POLYOMINO_MULTIHEDRAL_TEST02: POLYOMINO_MULTIHEDRAL must solve a multihedral polyomino tiling problem for a subset of a 4x4 rectangle. Region R: 1 0 0 0 1 0 0 0 1 1 1 1 1 1 1 1 Polyomino N: 0 0 1 1 1 1 Polyomino O: 1 1 1 Polyomino P: 0 1 1 1 VERBOSE: The internal variable "verbose" is set to "true"; Print statements marked "VERBOSE" can be suppressed by setting "verbose" to "false". VERBOSE: POLYOMINO_MULTIHEDRAL: Analyze the problem of tiling a region R using copies, possibly rotated or reflected, of several polyominoes. VERBOSE: Input R_SHAPE has shape (4,4). VERBOSE: Input R_SHAPE is a binary matrix. VERBOSE: Condensed R_SHAPE has shape (4,4). VERBOSE: Input P(1) has shape (4,4). VERBOSE: Input P(1) is a binary matrix. VERBOSE: Condensed P(1) has shape (2,3). VERBOSE: Input P(2) has shape (4,4). VERBOSE: Input P(2) is a binary matrix. VERBOSE: Condensed P(2) has shape (1,3). VERBOSE: Input P(3) has shape (4,4). VERBOSE: Input P(3) is a binary matrix. VERBOSE: Condensed P(3) has shape (2,2). 14x30 system matrix A and right hand side B: 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 1 1 1 0 1 0 1 0 0 0 1 1 0 0 0 1 0 0 1 0 0 1 1 0 0 1 0 0 1 1 1 0 1 0 1 1 1 1 1 0 0 0 0 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 1 0 0 1 1 1 1 0 0 0 0 0 1 0 0 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 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 1-1 0 0 1-1-1 0 0 0 0 1 1-2 1-1 1 1 0 1-1 -1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1-1 0 0-1-1-1-1-2-1-1-2-1-1 0-1 -1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 0 0 1 0 1 0 1 0 1 0 0 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 0-1 0-1 0-1 0-1 0 0-1 0-1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 VERBOSE: Seek binary solutions with exactly 3 nonzeros VERBOSE: System has 18 degrees of freedom. VERBOSE: Augmented Row-Reduced Echelon Form system matrix A and right hand side B: Columns associated with a free variable are headed with a "*" : : : : : : : : : * * : : * * * * : * * * * * * * * * * * * 1 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0-1 1 1-1 1 1-1 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0-1 1 1 0 0 1 2 1 1 3 1 1 2 1 1 0 2 2 0 0 1 0 0 0 0 0 0 0 1 0 0-1-1-1 0 0-1 0-1-1 1 1-1-1-1 0-1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0-1-1-1-1 0 0-1 1-1-1-1 1-1-1 0 0-1 -1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0-1 0 0 0 1 1 1 1 0-1-1-1-2-1-1-1-2-1 0-1-1 0 0 0 0 0 0 0 1 0 0 1 0 0 0-1-1-1 0 0 1 1 1 2 1 1 1 2 2 0 1 1 0 0 0 0 0 0 0 0 1 0 1-1 0 0 1-1-1 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 VERBOSE: Tried 988 right hands sides, found 2 solutions. 2 binary solutions were found. Binary solution vectors x: 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 Check Loo residuals ||Ax-b||: Solution vector 1 has a nonzero Loo residual of 4 Solution vector 2 has a nonzero Loo residual of 4 Check Loo residuals ||Ax-b||: All solutions had zero residual. Translate each correct solution into a tiling: Tiling based on solution 1 Numeric Labels 3 0 0 0 3 0 0 0 4 7 3 2 4 4 1 2 Tiling based on solution 1 "Colors" 2 0 0 0 2 0 0 0 3 5 2 1 3 3 1 1 Tiling based on solution 2 Numeric Labels 3 0 0 0 3 0 0 0 4 7 3 2 1 4 4 2 Tiling based on solution 2 "Colors" 2 0 0 0 2 0 0 0 3 5 2 1 1 3 3 1 polyomino_multihedral_test: Normal end of execution. 01-Mar-2019 08:05:52