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

Home > General > Word Problems
Alphabet from 8 Words (Posted on 2009-04-04) Difficulty: 4 of 5
Insert all 26 letters of the alphabet in place of the hyphens below, to form valid common English words.

All 26 letters are to be used, in the 26 spaces.

-A-ERI--
-U---E
-I--E
--L-ER
-I--
--AP
BR---N
-OL--A-

  Submitted by Charlie    
Rating: 4.0000 (1 votes)
Solution: (Hide)
MaVeriCK BuSTLe PiQUe GOlFer JiNX WRap brAZEn HolIDaY

MaVeriCK SuBTLe PiQUe GOlFer JiNX WRap brAZEn HolIDaY

DECLARE SUB place (psn!)
DATA -a-eri--,-u---e,-i--e,--l-er
DATA -i--,--ap,br---n,-ol--a-
CLS
DIM SHARED seq$(8), src$(8, 520), tot(8), used(26), h$(8)

FOR i = 1 TO 8
  READ seq$(i)
  PRINT seq$(i); " ";
NEXT
PRINT

FOR i = 1 TO 8
  temp$ = seq$(i)
  l = LEN(temp$)
  w$ = SPACE$(l)
  OPEN "\words\words" + LTRIM$(STR$(l)) + ".txt" FOR BINARY AS #1
  DO
   GET #1, , w$
   IF EOF(1) THEN EXIT DO
   good = 1
   FOR j = 1 TO l
     IF MID$(temp$, j, 1) <> "-" AND MID$(temp$, j, 1) <> MID$(w$, j, 1) THEN
       good = 0: EXIT FOR
     END IF
   NEXT
   IF good THEN
     PRINT w$: tot(i) = tot(i) + 1
     src$(i, tot(i)) = w$
   END IF
  LOOP
  CLOSE 1
NEXT
PRINT
FOR i = 1 TO 8
  PRINT tot(i);
NEXT
PRINT

place 1
PRINT
END

SUB place (psn)
  FOR i = 1 TO tot(psn)
   IF psn = 1 THEN PRINT i, tot(psn)
   good = 1
   REDIM temp(26)
   FOR j = 1 TO LEN(seq$(psn))
    IF MID$(seq$(psn), j, 1) = "-" THEN
     ix = INSTR("abcdefghijklmnopqrstuvwxyz", MID$(src$(psn, i), j, 1))
     IF used(ix) OR temp(ix) THEN good = 0: EXIT FOR
     temp(ix) = 1
    END IF
   NEXT
   IF good THEN
    FOR j = 1 TO LEN(seq$(psn))
      IF MID$(seq$(psn), j, 1) = "-" THEN
       ix = INSTR("abcdefghijklmnopqrstuvwxyz", MID$(src$(psn, i), j, 1))
       used(ix) = 1
      END IF
    NEXT j
   
    h$(psn) = src$(psn, i)
   
    IF psn = 8 THEN
     PRINT
     FOR j = 1 TO 8
      FOR k = 1 TO LEN(src$(j, i))
        IF MID$(seq$(j), k, 1) = "-" THEN
         PRINT UCASE$(MID$(h$(j), k, 1));
        ELSE
         PRINT MID$(h$(j), k, 1);
        END IF
      NEXT k
      PRINT " ";
     NEXT
     PRINT
    ELSE
     place psn + 1
    END IF
   
    FOR j = 1 TO LEN(seq$(psn))
      IF MID$(seq$(psn), j, 1) = "-" THEN
       ix = INSTR("abcdefghijklmnopqrstuvwxyz", MID$(src$(psn, i), j, 1))
       used(ix) = 0
      END IF
    NEXT j
   END IF
  NEXT
END SUB

From Giant Book of Mensa Mind Challenges, edited by Todd Johnson, Section 3: "Nearly Impossible Brain Bafflers", page 200.

Comments: ( You must be logged in to post comments.)
  Subject Author Date
SolutionPuzzle SolutionK Sengupta2022-07-30 22:24:44
re(2): 2 solutions (spoiler)Daniel2009-04-05 09:27:38
re: 2 solutions (spoiler)Dej Mar2009-04-05 09:26:02
all computer solutions and codeDaniel2009-04-05 04:01:58
2 solutions (spoiler)Daniel2009-04-05 03:43:19
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 (21)
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