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

Home > General > Word Problems
Word Grid (Posted on 2009-07-19) Difficulty: 3 of 5
Arrange the letters A, A, B, E, N, P, R, U and Y into a 3x3 grid so that the three rows read left-to-right as three common words, as do the three columns from top to bottom, and the two diagonals also from top to bottom.

  Submitted by Charlie    
Rating: 4.0000 (1 votes)
Solution: (Hide)
DECLARE FUNCTION isWord% (w$)
DECLARE SUB permute (a$)
CLS
a$ = "aabenpruy": h$ = a$
DO
  w1$ = LEFT$(a$, 3): w2$ = MID$(a$, 4, 3): w3$ = RIGHT$(a$, 3)
  w4$ = MID$(a$, 1, 1) + MID$(a$, 4, 1) + MID$(a$, 7, 1)
  w5$ = MID$(a$, 2, 1) + MID$(a$, 5, 1) + MID$(a$, 8, 1)
  w6$ = MID$(a$, 3, 1) + MID$(a$, 6, 1) + MID$(a$, 9, 1)
  w7$ = MID$(a$, 1, 1) + MID$(a$, 5, 1) + MID$(a$, 9, 1)
  w8$ = MID$(a$, 3, 1) + MID$(a$, 5, 1) + MID$(a$, 7, 1)
  IF isWord(w1$) THEN
  IF isWord(w2$) THEN
  IF isWord(w3$) THEN
  IF isWord(w4$) THEN
  IF isWord(w5$) THEN
  IF isWord(w6$) THEN
  IF isWord(w7$) THEN
  IF isWord(w8$) THEN

     PRINT : PRINT w1$: PRINT w2$: PRINT w3$: PRINT

  END IF
  END IF
  END IF
  END IF
  END IF
  END IF
  END IF
  END IF
  permute a$
LOOP UNTIL a$ = h$

DEFINT A-Z
FUNCTION isWord (w$)
  n = LEN(w$)
  IF w$ = "i" THEN isWord = 1: EXIT FUNCTION
  w1$ = SPACE$(n)
  OPEN "\words\words" + LTRIM$(STR$(n)) + ".txt" FOR BINARY AS #2
  l = LOF(2) / n
  low = 1: high = l
  DO
    mid = INT((low + high) / 2)
    GET #2, (mid - 1) * n + 1, w1$
    IF w1$ = w$ THEN isWord = 1: CLOSE 2: EXIT FUNCTION
    IF w1$ < w$ THEN low = mid + 1:  ELSE high = mid - 1
  LOOP UNTIL low > high
  isWord = 0
  CLOSE 2
END FUNCTION
 
finds

pea
urn
bay

and

pub
era
any

Since ARB is not a common word, the second one is the solution. A dictionary shows that "arb" is a word meaning "arbitrager", by shortening, as, for example, a "tux" is another word for a "tuxedo".

From the Page-A-Day 2009 "Mensa 365 Brain Puzzlers" calendar for 2009, July 11 page. (Abbie F. Salny, Mark Danna, and Fraser Simpson.)

Comments: ( You must be logged in to post comments.)
  Subject Author Date
SolutionPuzzle SolutionK Sengupta2022-05-28 23:30:50
re(2): SolutionJyqm2009-07-20 14:22:59
SolutionThe quick solution I foundDej Mar2009-07-20 09:55:12
computer solutionDaniel2009-07-19 23:39:22
re: Solutionbrianjn2009-07-19 22:56:03
SolutionJyqm2009-07-19 17:06:45
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
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