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

Home > Numbers
Cubic Diagonals and Edges (Posted on 2009-04-30) Difficulty: 3 of 5
This is the net map of the outer surfaces of the 20 edge cubes that represents
a 3 x 3 x 3 'parent' cube (like in a Rubik cube).

A B C
D E
F G H
A D F
I J
M N O
F G H
J K
O P Q
H E C
K L
Q R S
C B A
L I
S T M
O P Q
N R
M T S

Assign unique values from 1 to 20 to the letters A-T such that the sum of each pair of diametrically opposite cubes is to be the same as all others while the sum of each set of edge cubes may not differ from that of any other set by more than one.

Eg, diagonals:
                    A + Q = N + E = C + O ...(etc)
and edge cubes:     A + B + C = C + E + H = F + G + H ...etc,
                or (A + B + C) ±1 = C + E + H
                                  = F + G + H ....(etc) 
Note: The problem's development and my solution used a spreadsheet; as such a well-constructed sheet could enable a solution. Although this problem may lend itself to a programmed solution I would appreciate seeing attempts of a more manual basis within the first 24-48 hrs.

See The Solution Submitted by brianjn    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
re: computer solutions--the program | Comment 3 of 6 |
(In reply to computer solutions by Charlie)

DIM SHARED used(20)

OPEN "cubediag.txt" FOR OUTPUT AS #2
OPEN "cdcornrs.txt" FOR OUTPUT AS #3

FOR a = 1 TO 10
 used(a) = 1
 q = 21 - a
 used(q) = 1
FOR b = 1 TO 20
IF used(b) = 0 AND used(21 - b) = 0 THEN
 used(b) = 1
 p = 21 - b
 used(p) = 1
FOR c = 1 TO 20
IF used(c) = 0 AND used(21 - c) = 0 THEN
 used(c) = 1
 o = 21 - c
 used(o) = 1


abc = a + b + c
opq = o + p + q
IF ABS(abc - opq) <= 1 THEN

FOR d = 1 TO 20
IF used(d) = 0 AND used(21 - d) = 0 THEN
 used(d) = 1
 r = 21 - d
 used(r) = 1
FOR f = 1 TO 20
IF used(f) = 0 AND used(21 - f) = 0 THEN
 used(f) = 1
 s = 21 - f
 used(s) = 1

 adf = a + d + f
 qrs = q + r + s
 IF ABS(adf - qrs) <= 1 THEN


FOR e = 1 TO 20
IF used(e) = 0 AND used(21 - e) = 0 THEN
 used(e) = 1
 n = 21 - e
 used(n) = 1
FOR h = 1 TO 20
IF used(h) = 0 AND used(21 - h) = 0 THEN
 used(h) = 1
 m = 21 - h
 used(m) = 1

 ceh = c + e + h
 mno = m + n + o
 IF ABS(ceh - mno) <= 1 THEN

FOR g = 1 TO 20
IF used(g) = 0 AND used(21 - g) = 0 THEN
 used(g) = 1
 t = 21 - g
 used(t) = 1

 fgh = f + g + h
 mts = m + t + s
 IF ABS(fgh - mts) <= 1 THEN

FOR i = 1 TO 20
IF used(i) = 0 AND used(21 - i) = 0 THEN
 used(i) = 1
 k = 21 - i
 used(k) = 1

 aim = a + i + m
 hkq = h + k + q
 IF ABS(aim - hkq) <= 1 THEN


FOR j = 1 TO 20
IF used(j) = 0 AND used(21 - j) = 0 THEN
 used(j) = 1
 l = 21 - j
 used(l) = 1

 fjo = f + j + o
 slc = s + l + c
 IF ABS(fjo - slc) <= 1 THEN

 IF a < c AND a < f AND a < h AND a < o AND a < q AND a < m AND a < s THEN
 IF b < d AND d < i THEN
   ct = ct + 1
   PRINT #2, ct
   PRINT #2, SPACE$(9);
   PRINT #2, USING " ##"; a; b; c
   PRINT #2, SPACE$(9);
   PRINT #2, USING " ##"; d; 0; e
   PRINT #2, SPACE$(9);
   PRINT #2, USING " ##"; f; g; h
   PRINT #2, USING " ##"; a; d; f; f; g; h; h; e; c; c; b; a
   PRINT #2, USING " ##"; i; 0; j; j; 0; k; k; 0; l; l; 0; i
   PRINT #2, USING " ##"; m; n; o; o; p; q; q; r; s; s; t; m
   PRINT #2, SPACE$(9);
   PRINT #2, USING " ##"; o; p; q
   PRINT #2, SPACE$(9);
   PRINT #2, USING " ##"; n; 0; r
   PRINT #2, SPACE$(9);
   PRINT #2, USING " ##"; m; t; s

   crns$ = STR$(a)
   IF c <= 10 THEN crns$ = crns$ + STR$(c)
   IF f <= 10 THEN crns$ = crns$ + STR$(f)
   IF h <= 10 THEN crns$ = crns$ + STR$(h)
   IF o <= 10 THEN crns$ = crns$ + STR$(o)
   IF q <= 10 THEN crns$ = crns$ + STR$(q)
   IF m <= 10 THEN crns$ = crns$ + STR$(m)
   IF s <= 10 THEN crns$ = crns$ + STR$(s)
   PRINT #3, crns$
   PRINT #2,
   PRINT #2, abc; opq; adf; qrs; ceh; mno; fgh; mts; aim; hkq; fjo; slc
 END IF
 END IF

 

 


 END IF ' fjo vs slc

 used(l) = 0
 used(j) = 0
END IF
NEXT

 END IF ' aim vs hkq

 used(k) = 0
 used(i) = 0
END IF
NEXT


 END IF ' fgh vs mts

 used(t) = 0
 used(g) = 0
END IF
NEXT


 END IF ' ceh vs mno

 used(h) = 0
 used(m) = 0
END IF
NEXT
 used(e) = 0
 used(n) = 0
END IF
NEXT


 END IF ' adf vs qrs

 used(f) = 0
 used(s) = 0
END IF
NEXT
 used(d) = 0
 used(r) = 0
END IF
NEXT

END IF  'abc vs opq

 used(c) = 0
 used(o) = 0
END IF
NEXT
 used(b) = 0
 used(p) = 0
END IF
NEXT
 used(a) = 0
 used(q) = 0
NEXT

 


  Posted by Charlie on 2009-05-01 12:02:43
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 (12)
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