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

 Group Endeavor (Posted on 2013-01-29)
Consider Groups I and II consisting of positive integers from 1 to 7, where:
`Group I = {1,2,4,7} and, Group II = {3,5,6}`
It is observed that the sum of any two numbers of either group is either greater than the largest number or is in the other group.

For example, 1 and 2 belong to the first group whose sum (3) belongs to the second group. Also, 3 and 5 belong to the second group, whose sum (8) is greater than the largest number (6) in the second group.

Can you come up with arrangement of the first eight positive integers, that is from 1 to 8 inclusively, that satisfies the same two properties?

 No Solution Yet Submitted by K Sengupta Rating: 1.5000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re(2): additional possibilities...LIST THEM | Comment 6 of 8 |

In fact, the program:

FOR a = 1 TO 2
n(1) = a
FOR b = 1 TO 2
n(2) = b
FOR c = 1 TO 2
n(3) = c
FOR d = 1 TO 2
n(4) = d
FOR e = 1 TO 2
n(5) = e
FOR f = 1 TO 2
n(6) = f
FOR g = 1 TO 2
n(7) = g
FOR h = 1 TO 2
n(8) = h
FOR i = 1 TO 8
IF n(i) = 1 THEN large1 = i:  ELSE large2 = i
NEXT
good = 1
FOR i = 1 TO 7
FOR j = i + 1 TO 8
sum = i + j
IF i + j <= 8 THEN
IF n(i) = n(j) THEN
IF n(i) = 1 AND sum <= large1 AND n(sum) <> 2 THEN good = 0: EXIT FOR
IF n(i) = 2 AND sum <= large2 AND n(sum) <> 1 THEN good = 0: EXIT FOR
END IF
END IF
NEXT
IF good = 0 THEN EXIT FOR
NEXT
IF good THEN
FOR i = 1 TO 8
IF n(i) = 1 THEN PRINT i;
NEXT
PRINT " | ";
FOR i = 1 TO 8
IF n(i) = 2 THEN PRINT i;
NEXT
PRINT
END IF
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT
NEXT

finds only

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

with the only difference being the order of the groups, left vs right.

 Posted by Charlie on 2013-01-30 10:44:07

 Search: Search body:
Forums (0)