All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Shapes
Double Coverage (Posted on 2009-09-29) Difficulty: 2 of 5
The two pentominos pictured below cannot tile any rectangle.
+--+  +--+   +--+--+
|  |  |  |   |  |  |
+--+--+--+   +--+--+--+--+
|  |  |  |      |  |  |  | 
+--+--+--+      +--+--+--+
Take eight copies of one pentomino and place them on a 4x5 rectangle such that each 1x1 subsquare of the rectangle has exactly two pentominos covering it.

No Solution Yet Submitted by Brian Smith    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
computer solution for first pentomino | Comment 1 of 4

In the following table, each row represents one of the eight pieces. The row and column are for the upper-leftmost position occupied by the piece, and the orientation is 0 for the same orientation as shown in the puzzle, 1 for rotated clockwise 90, 2 for rotated 180, and 3 for rotated clockwise 270.

Assume the 4x5 grid is 4 rows high and 5 columns wide.

upper-left
 corner
row column orientation
 3     1        0
 3     3        0
 1     4        1
 2     4        1
 1     1        2
 1     3        2
 1     1        3
 2     1        3
 
Description:

Assume the 4x5 grid is 4 rows high and 5 columns wide.

Two upside down U's are placed in the top two rows, overlapping in the middle column. Similarly, two right-side-up U's are placed in the bottom two rows, also overlapping in the middle column. Two U's with their tops to the left are placed in the left two columns, placed so that one arm of each U fills the empty spot left in the middle of the other U. Similarly on the right, the tops face outward (to the right) and are placed the same way, symmetrically with the left two.

DECLARE SUB place (pc!)

CLEAR , , 25000

DIM SHARED bd(4, 5)
DIM SHARED row(8), col(8), orient(8), chkProg(8)
'orient: 0 = top up; 1 = top to right; 2 = top down; 3 = top to left

CLS

place 1


SUB place (pc)
  FOR o = 0 TO 3
   v = o MOD 2
   FOR r = 1 TO 3 - v
     FOR c = 1 TO 3 + v
       IF pc = 1 THEN PRINT o, r, c
       orc = 100 * o + 10 * r + c

       IF bd(r, c) < 2 AND orc >= chkProg(pc - 1) THEN
         good = 1
         FOR r2 = r TO r + 1 + v
           FOR c2 = c TO c + 2 - v
            chk = 1
            IF o = 0 AND r2 = r AND c2 = c + 1 THEN chk = 0
            IF o = 1 AND r2 = r + 1 AND c2 = c + 1 THEN chk = 0
            IF o = 2 AND r2 = r + 1 AND c2 = c + 1 THEN chk = 0
            IF o = 3 AND r2 = r + 1 AND c2 = c THEN chk = 0
            IF chk THEN
              IF bd(r2, c2) > 1 THEN good = 0
            END IF
           NEXT
         NEXT
         IF good THEN
           FOR r2 = r TO r + 1 + v
             FOR c2 = c TO c + 2 - v
              chk = 1
              IF o = 0 AND r2 = r AND c2 = c + 1 THEN chk = 0
              IF o = 1 AND r2 = r + 1 AND c2 = c + 1 THEN chk = 0
              IF o = 2 AND r2 = r + 1 AND c2 = c + 1 THEN chk = 0
              IF o = 3 AND r2 = r + 1 AND c2 = c THEN chk = 0
              IF chk THEN
                bd(r2, c2) = bd(r2, c2) + 1
              END IF
             NEXT
           NEXT
           row(pc) = r: col(pc) = c: orient(pc) = o
           chkProg(pc) = orc

           IF pc < 8 THEN
            place pc + 1
           ELSE
            FOR i = 1 TO 8
              PRINT row(i); col(i); orient(i)
            NEXT
            PRINT
            DO: LOOP UNTIL INKEY$ > ""
           END IF

          
           FOR r2 = r TO r + 1 + v
             FOR c2 = c TO c + 2 - v
              chk = 1
              IF o = 0 AND r2 = r AND c2 = c + 1 THEN chk = 0
              IF o = 1 AND r2 = r + 1 AND c2 = c + 1 THEN chk = 0
              IF o = 2 AND r2 = r + 1 AND c2 = c + 1 THEN chk = 0
              IF o = 3 AND r2 = r + 1 AND c2 = c THEN chk = 0
              IF chk THEN
                bd(r2, c2) = bd(r2, c2) - 1
              END IF
             NEXT
           NEXT
         END IF
       END IF
     NEXT
   NEXT r
  NEXT o
END SUB


 


  Posted by Charlie on 2009-09-29 13:03:04
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (2)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2017 by Animus Pactum Consulting. All rights reserved. Privacy Information