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

 Safe Combination (Posted on 2013-09-09)
```
C
B   D
A      E
o         F
K      G
J  H
I```
The diagram above represents a dial on a safe which has 12 points, one of them white (denoted by o). This white point, is to be turned to each letter in turn, but not in alphabetical order, to open the safe. The dial should be turned toward the letters as follows:
1. A before D but after B.
2. B before C but after H.
3. H before F, F before G, G before I and I before J.
4. H after K, K before F, F after D, D before G, and G after E.
5. E before D, C before E, E after B, C before G, and A after E.
What is the order of letters to which the white point should be turned in order to open the safe?

 No Solution Yet Submitted by K Sengupta Rating: 2.0000 (1 votes)

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

CLEAR , , 25000
DIM SHARED used(11), alpha AS STRING, h AS STRING

alpha = "abcdefghijk"

CLS

h = ""

FOR i = 1 TO 11
IF used(i) = 0 THEN
l\$ = MID\$(alpha, i, 1)
IF INSTR(h, l\$) = 0 THEN
good = 1
SELECT CASE l\$
CASE "a"
IF INSTR(h, "b") = 0 OR INSTR(h, "d") > 0 THEN good = 0
IF INSTR(h, "e") = 0 THEN good = 0
CASE "b"
IF INSTR(h, "h") = 0 OR INSTR(h, "c") > 0 THEN good = 0
CASE "c"
IF INSTR(h, "e") > 0 OR INSTR(h, "g") > 0 THEN good = 0
CASE "d"
IF INSTR(h, "g") > 0 THEN good = 0
CASE "e"
IF INSTR(h, "d") > 0 OR INSTR(h, "b") = 0 THEN good = 0
CASE "f"
IF INSTR(h, "d") = 0 OR INSTR(h, "g") > 0 THEN good = 0
CASE "g"
IF INSTR(h, "e") = 0 OR INSTR(h, "i") > 0 THEN good = 0
CASE "h"
IF INSTR(h, "f") > 0 OR INSTR(h, "k") = 0 THEN good = 0
CASE "i"
IF INSTR(h, "j") > 0 THEN good = 0
END SELECT
IF good THEN
h = h + l\$
IF LEN(h) = 11 THEN
PRINT h
ELSE
END IF
h = LEFT\$(h, LEN(h) - 1)
END IF

END IF
END IF
NEXT
END SUB

finds the order as

 Posted by Charlie on 2013-09-09 17:29:58

 Search: Search body:
Forums (0)