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

Home > Numbers
Postage: 1 to N (Posted on 2010-09-02) Difficulty: 3 of 5
A page of postage stamps in a booklet contained 6 stamps from which it was possible to obtain any total value from 1 to the total value of all the stamps on the page by the appropriate selection of one or more orthogonally connected stamps from those laid out in the following manner:

+-----+-----+-----+
|     |     |     |
|  1  |  2  |  x  |
|     |     |     |
+-----+-----+-----+
|     |     |     |
|  4  |  6  |  y  |
|     |     |     |
+-----+-----+-----+

With the numbers chosen, four of the values could be obtained in two different ways each, and the rest could be obtained in only one way each.

Your job is to figure out the numeric values of x and y.

Note that the square portion already given, containing 1, 2, 4 and 6, would, by itself satisfy the mentioned criterion: all the values from 1 to 13 can be achieved as the total of orthogonally connected stamps, such as 1, 2 and 4 to make 7 (the 6 and the 1 are not orthogonally connected, so that would not be allowed).

  Submitted by Charlie    
Rating: 3.0000 (2 votes)
Solution: (Hide)
CLS

FOR x = 1 TO 20
FOR y = 1 TO 20
  tot = 13 + x + y
  ct2 = 0
  REDIM amt(tot)
  FOR i = 1 TO 13: amt(i) = 1: NEXT
  amt(x) = amt(x) + 1
  amt(y) = amt(y) + 1
  amt(x + y) = amt(x + y) + 1
  amt(x + 2) = amt(x + 2) + 1
  amt(x + 3) = amt(x + 3) + 1
  amt(x + 8) = amt(x + 8) + 1
  amt(x + 9) = amt(x + 9) + 1
  amt(x + 7) = amt(x + 7) + 1
  amt(x + 12) = amt(x + 12) + 1
  amt(x + 13) = amt(x + 13) + 1
  amt(y + 6) = amt(y + 6) + 1
  amt(y + 10) = amt(y + 10) + 1
  amt(y + 11) = amt(y + 11) + 1
  amt(y + 12) = amt(y + 12) + 1
  amt(y + 9) = amt(y + 9) + 1
  amt(y + 13) = amt(y + 13) + 1
  amt(y + 8) = amt(y + 8) + 1
  amt(x + y + 2) = amt(x + y + 2) + 1
  amt(x + y + 3) = amt(x + y + 3) + 1
  amt(x + y + 8) = amt(x + y + 8) + 1
  amt(x + y + 9) = amt(x + y + 9) + 1
  amt(x + y + 7) = amt(x + y + 7) + 1
  amt(x + y + 13) = amt(x + y + 13) + 1
  amt(x + y + 12) = amt(x + y + 12) + 1
  amt(x + y + 6) = amt(x + y + 6) + 1
  amt(x + y + 10) = amt(x + y + 10) + 1
  amt(x + y + 11) = amt(x + y + 11) + 1
  good = 1
  FOR i = 1 TO tot
   IF amt(i) = 0 OR amt(i) > 2 THEN good = 0: EXIT FOR
   IF amt(i) = 2 THEN ct2 = ct2 + 1
  NEXT
  IF good THEN
    PRINT x; y,
    FOR i = 1 TO tot
      PRINT amt(i);
    NEXT
    PRINT : PRINT "*"; ct2
  END IF
NEXT
NEXT

finds x=7,y=8 and x=15,y=8 as the only two sets of values for which any given value has only one or two ways of being achieved, but the former has 12 values that could be achieved in two ways, so the latter, (x=15,y=8), has the four such values as sought: 8, 17, 18 and 23.

The search set could have been narrowed down to where N=36, so that x+y=23, by the following reasoning:

There are 6 single-stamp sets.
There are 7 2-stamp sets.
There are 10 3-stamp sets.
There are 10 4-stamp sets.
There are 6 5-stamp sets.
There is 1 6-stamp set.

This adds up to 40 sets. Given that exactly four totals are represented by two sets each, that means there are 36 different totals achievable and therefore the total of all the stamps is 36.


From Enigma No. 1596, "Semi-detached", by Bob Walker, New Scientist, 22 May 2010, page 28.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
re(2): solutionDej Mar2010-09-03 02:41:51
Solutioned bottemiller2010-09-02 14:59:29
Questionre: solutionAdy TZIDON2010-09-02 14:26:26
SolutionsolutionDej Mar2010-09-02 12:57:02
an interim solutionAdy TZIDON2010-09-02 12:20:58
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 (7)
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