A certain word has thirteen letters.
1) Each pair of letters below consists of one letter contained in the word and one "other" letter.
A | B | C | D | E | F | G | H | I | J | L | S | Y |
V | W | Q | M | K | U | N | P | O | R | X | T | Z |
2) When each "other" letter is put beneath each letter in the word, the "other" letters will appear in alphabetical order.
3) The word has the same number of letters in common with each of the following words:
FACE QUEST QUICK SWITCH WORLD
What is the word?
The following program finds only the word "unpredictably", using only the first two clues. The third clue does check out, with 3 letters in common when paired with any of the five words given.
DATA av,bw,cq,dm,ek,fu,gn,hp,io,jr,lx,st,yz
DIM pair(13) AS STRING, other(13) AS STRING
FOR i = 1 TO 13: READ pair(i): NEXT
OPEN "\words\words13.txt" FOR BINARY AS #1
w$ = SPACE$(13)
DO
GET #1, , w$
IF EOF(1) THEN EXIT DO
FOR p = 1 TO LEN(w$)
l$ = MID$(w$, p, 1)
FOR i = 1 TO 13
ix = INSTR(pair(i), l$)
IF ix THEN
other(p) = MID$(pair(i), 3 - ix, 1): EXIT FOR
END IF
NEXT
NEXT p
good = 1
FOR i = 1 TO 12
IF other(i + 1) <= other(i) THEN good = 0: EXIT FOR
NEXT
IF good THEN PRINT w$
LOOP
CLOSE
|
Posted by Charlie
on 2012-03-29 11:51:04 |