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

Home > Numbers
Grid and Equal Subgrids (Posted on 2009-08-14) Difficulty: 2 of 5
Substitute each of the capital letters in bold in this 3x3 grid by a different digit from 1 to 9 such that the sum of digits in each of the four 2x2 subgrids is equal to 9*E.

A   B   C
D   E   F
G   H   I

What will be the arrangement(s) (disregarding reflections and rotations), if keeping all the other conditions unchanged, the sum of digits in each of the four 2x2 subgrids is equal to 7*E?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 3 of 4 |

To avoid reflections/rotations, A is the lowest corner and C is less than G:

CLS
FOR a = 1 TO 6
 used(a) = 1
FOR c = a + 1 TO 8
 used(c) = 1
FOR g = c + 1 TO 9
 used(g) = 1
FOR i = 1 TO 9
 IF used(i) = 0 THEN
   used(i) = 1

FOR b = 1 TO 9
 IF used(b) = 0 THEN
  used(b) = 1
FOR d = 1 TO 9
 IF used(d) = 0 THEN
  used(d) = 1
  FOR f = 1 TO 9
   IF used(f) = 0 THEN
    used(f) = 1
  FOR h = 1 TO 9
   IF used(h) = 0 THEN
    used(h) = 1
    IF a + d = c + f THEN
    IF b + c = h + i THEN
    IF f + i = d + g THEN
    IF g + h = a + b THEN
       e = 45 - a - b - c - d - f - g - h - i
       IF a + b + d + e = 9 * e OR a + b + d + e = 7 * e THEN
         PRINT
         PRINT a; b; c
         PRINT d; e; f
         PRINT g; h; i
         PRINT (a + b + d + e) / e
       END IF
    END IF
    END IF
    END IF
    END IF
    used(h) = 0
   END IF
  NEXT
    used(f) = 0
   END IF
  NEXT
  used(d) = 0
 END IF
NEXT
  used(b) = 0
 END IF
NEXT b

 used(i) = 0
END IF
NEXT i
 used(g) = 0
NEXT g
 used(c) = 0
NEXT c
 used(a) = 0
NEXT a

produces


 1  9  2
 8  3  7
 4  6  5
 7
 3  4  5
 9  2  7
 6  1  8
 9
 4  3  5
 9  2  8
 6  1  7
 9

In each case, the multiple appears below the array.


  Posted by Charlie on 2009-08-14 15:34:21
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 (14)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

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