In the following octahedral net the vertices A, B, C, D, E and F, and are to be assigned distinctive values from 1 through 9.
M, N, O, P, Q, R, S and T are the values of the respective sums of the three vertices which form the respective surfaces to which each is assigned.
M + N = O + P = Q + R = S + T
Find
unique sets of values1 for A, B, C, D, E and F such that the values of M through T (but not necessarily in that order) form series which increment by 2 of which there are 7.
Background statistics:
Unique Actual
M+N= Interval Sets2 Solutions
21 1 1 96
23 1 2 96
25 1 2 96
26 2 2 96
27 1 5 480
29 1 4 288
30 2 3 144
31 1 8 288
33 1 6 480
34 2 2 96
35 1 2 96
37 1 2 96
39 1 1 96
40 2448
Note:
1. For M+N=21,
1, 2, 3, 6, 4, 5
1, 2, 3, 6, 5, 4
and 1, 2, 5, 3, 4, 6
are the first 3 of 96 solutions. The 96 values do not
discriminate amongst vertex rotation or reflections.
2. Each unique set configures the octahedron in more ways than one.
The pairs of rows below contain the same set of integers within the pair, and there are indeed 7 pairs. The reversal of E and F changes only the handedness of the octahedron as E and F are opposite vertices.
A B C D E F M N O P Q R S T
1 4 9 2 3 7 18 8 20 6 12 14 10 16
1 4 9 2 7 3 14 12 16 10 8 18 6 20
1 6 9 2 3 5 16 10 20 6 12 14 8 18
1 6 9 2 5 3 14 12 18 8 10 16 6 20
1 6 9 2 5 7 18 12 22 8 14 16 10 20
1 6 9 2 7 5 16 14 20 10 12 18 8 22
1 5 9 3 4 8 20 10 22 8 14 16 12 18
1 5 9 3 8 4 16 14 18 12 10 20 8 22
1 7 9 3 4 6 18 12 22 8 14 16 10 20
1 7 9 3 6 4 16 14 20 10 12 18 8 22
1 7 9 3 6 8 20 14 24 10 16 18 12 22
1 7 9 3 8 6 18 16 22 12 14 20 10 24
1 8 9 4 5 7 20 14 24 10 16 18 12 22
1 8 9 4 7 5 18 16 22 12 14 20 10 24
The program as initially written contains a bug that actually had no effect. It assumes vertex A has the digit 1, but in actual fact, there's no initial assurance that a 1 is part of every solution:
DECLARE SUB permute (a$)
CLS
a = 1
FOR c = 2 TO 9
used(c) = 1
FOR d = 2 TO 6
IF used(d) = 0 THEN
used(d) = 1
FOR x = d + 1 TO 9
IF used(x) = 0 THEN
used(x) = 1
s1$ = LTRIM$(STR$(x))
FOR y = x + 1 TO 9
IF used(y) = 0 THEN
used(y) = 1
s2$ = s1$ + LTRIM$(STR$(y))
FOR z = y + 1 TO 9
IF used(z) = 0 THEN
used(z) = 1
s3$ = s2$ + LTRIM$(STR$(z))
h$ = s3$
DO
b = VAL(MID$(s3$, 1, 1))
e = VAL(MID$(s3$, 2, 1))
f = VAL(MID$(s3$, 3, 1))
m = c + d + f: n = a + b + e
o = c + f + b: p = a + d + e
q = a + b + f: r = e + d + c
s = f + d + a: t = b + c + e
v(1) = m
v(2) = n
v(3) = o
v(4) = p
v(5) = q
v(6) = r
v(7) = s
v(8) = t
DO
done = 1
FOR i = 1 TO 7
IF v(i) > v(i + 1) THEN SWAP v(i), v(i + 1): done = 0
NEXT
LOOP UNTIL done
FOR i = 1 TO 7
IF v(i + 1) - v(i) <> 2 THEN done = 0: EXIT FOR
NEXT
IF done THEN PRINT a; b; c; d; e; f, m; n; o; p; q; r; s; t
permute s3$
LOOP UNTIL h$ = s3$
used(z) = 0
END IF
NEXT
used(y) = 0
END IF
NEXT
used(x) = 0
END IF
NEXT
used(d) = 0
END IF
NEXT d
used(c) = 0
NEXT c
END
A modified version, varying A from 2 to 4, without allowing for any 1's, verifies there is no solution without a 1.
|
Posted by Charlie
on 2008-12-30 17:45:22 |