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

Home > Just Math
Connnected Construction (Posted on 2013-09-13) Difficulty: 3 of 5
                     +--+
                     |  |
                     +--+
                     / \
                    /   \
                   /     \
                  /       \
                 /         \
                /           \
               /             \
              /               \ 
            +--+              +--+
            |  |              |  |
            +--+              +--+
            /|\                /|
           / | \              / |
          /  |  \            /  |
         /   |   \          /   |
        /    |    \        /    |
       /     |     \      /     |
      /      |      \    /      |
     /       |       \  /       |
  +--+     +--+      +--+     +--+
  |  |     |  |      |  |     |  |
  +--+     +--+      +--+     +--+
Using the digits from 1 to 9 exactly once, construct 7 positive integers so that each positive integer is equal to the sum of the positive integers in the squares that are connected to it from below. Some of these seven positive integers can contain more than one digit.

No Solution Yet Submitted by K Sengupta    
No Rating

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

DEFDBL A-Z
CLS
FOR a = 1 TO 9
FOR b = 1 TO 9
 IF b <> a THEN
FOR c = 1 TO 9
 IF c <> a AND c <> b THEN
FOR d = 1 TO 9
 IF d <> a AND d <> b AND d <> c THEN
   e = a + b + c
   f = c + d
   g = e + f
   concat$ = LTRIM$(STR$(a)) + LTRIM$(STR$(b)) + LTRIM$(STR$(c)) + LTRIM$(STR$(d)) + LTRIM$(STR$(e)) + LTRIM$(STR$(f)) + LTRIM$(STR$(g))
   good = 1
   FOR i = 1 TO LEN(concat$) - 1
     IF INSTR(MID$(concat$, i + 1), MID$(concat$, i, 1)) > 0 THEN good = 0
   NEXT
   IF LEN(concat$) <> 9 THEN good = 0
   IF good THEN
       PRINT g
       PRINT e; f
       PRINT a; b; c; d
       PRINT
   END IF
 END IF
NEXT
 END IF  'c<>a or b
NEXT
 END IF  ' b<>a
NEXT
NEXT

finds these solutions

 25
 18  7
 6  9  3  4

 25
 18  7
 9  6  3  4
 
as, of course, the two bottom-left figures are interchangeable.

Only single-digit numbers needed to be tested on the bottom row, as 2-digit numbers would propagate upward to make 2-digit numbers on all three levels while only two 2-digit numbers can be accommodated while using only nine digits in total.


  Posted by Charlie on 2013-09-13 12:24:44
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 (3)
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