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

Home > General > Word Problems
Three Words II (Posted on 2012-07-08) Difficulty: 4 of 5
This is a variation of Three Words.

In each of the following groups of three words, determine two of the three that can be paired to form an anagram of another word, which is a synonym of the word remaining.

(For example, considering the three words: NET, LEG and MEEK, we observe that combining the two words LEG and NET and, rearranging the letters, the word GENTLE can be obtained, which is a synonym of the remaining word MEEK.)

  1. GAVE, PIED, TIRADE
  2. NIB, CRIB, ASSET
  3. MOB, SKIP, LAG
  4. DRAIN, RULE, CONE
  5. CAMP, EERIEST, TREASURE
  6. HOST, DIE, TUMULT
  7. TOIL, ERASE, REBATE
  8. SCENT, CAP, DARN
  9. CAPE, HAND, LEAD
  10. CANE, GRACE, GLEE
  11. FORLORN, SLIME, BEAR
  12. CURE, GRIT, AGO
  13. RIB, ODD, RAZE
  14. HOLE, FELL, DIMS
  15. POISE, FENCED, COIN
  16. VENT, ROBE, STEM
  17. AGE , DO, RIPE
  18. COUP, TRADE, ACTION
  19. CORE, ROD, ROT
  20. OUTER, FUSE, ARC

No Solution Yet Submitted by K Sengupta    
No Rating

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

The program uses anagram dictionary files with file names of the form ANDICTx.TXT, where x is the number of letters in each word listed. Each record contains 2*x+1 characters: the letters of the word rearranged in alphabetic order, a space, and the word itself. The records are in order by the letters arranged in alphabetic order, rather than by the words themselves; that way, a binary search can take place on the generic anagram.


DECLARE SUB tryAnag (w$)
DECLARE FUNCTION isAnag$ (w$)
DATA      GAVE, PIED, TIRADE
DATA      NIB, CRIB, ASSET
DATA      MOB, SKIP, LAG
DATA      DRAIN, RULE, CONE
DATA      CAMP, EERIEST, TREASURE
DATA      HOST, DIE, TUMULT
DATA      TOIL, ERASE, REBATE
DATA      SCENT, CAP, DARN
DATA      CAPE, HAND, LEAD
DATA      CANE, GRACE, GLEE
DATA      FORLORN, SLIME, BEAR
DATA      CURE, GRIT, AGO
DATA      RIB, ODD, RAZE
DATA      HOLE, FELL, DIMS
DATA      POISE, FENCED, COIN
DATA      VENT, ROBE, STEM
DATA      AGE , DO, RIPE
DATA      COUP, TRADE, ACTION
DATA      CORE, ROD, ROT
DATA      OUTER, FUSE, ARC

CLS

FOR partNo = 1 TO 20
   READ w1$, w2$, w3$
   w1$ = LCASE$(w1$)
   w2$ = LCASE$(w2$)
   w3$ = LCASE$(w3$)
   PRINT LTRIM$(STR$(partNo)); ". "; w1$, w2$, w3$
   tryAnag w1$ + w2$
   tryAnag w1$ + w3$
   tryAnag w2$ + w3$

NEXT partNo

FUNCTION isAnag$ (w$)
  n = LEN(w$)
  w1$ = SPACE$(n): w2$ = SPACE$(2 * n + 1)
  OPEN "\words\andict" + LTRIM$(STR$(n)) + ".txt" FOR BINARY AS #10
  l = LOF(10) / (2 * n + 1)
  low = 1: high = l
  DO
    mid = INT((low + high) / 2)
    GET #10, (mid - 1) * (2 * n + 1) + 1, w1$
    IF w1$ = w$ THEN
     isa$ = ""
     FOR m = mid - 12 TO mid + 12
      IF m > 0 AND m <= l THEN
         GET #10, (m - 1) * (2 * n + 1) + 1, w2$
         IF LEFT$(w2$, n) = w$ THEN
          isa$ = isa$ + " " + RIGHT$(w2$, n)
         END IF
      END IF
     NEXT m
     isAnag$ = isa$
     CLOSE 10: EXIT FUNCTION
    END IF
    IF w1$ < w$ THEN low = mid + 1:  ELSE high = mid - 1
  LOOP UNTIL low > high
  isAnag = ""
  CLOSE 10
END FUNCTION

SUB tryAnag (w$)
 l = LEN(w$)
 IF l > 3 AND l < 13 THEN
  anag$ = w$
 
  DO
   done = 1
   FOR i = 1 TO l - 1
     IF MID$(anag$, i, 1) > MID$(anag$, i + 1, 1) THEN
       h$ = MID$(anag$, i, 1)
       MID$(anag$, i, 1) = MID$(anag$, i + 1, 1)
       MID$(anag$, i + 1, 1) = h$
       done = 0
     END IF
   NEXT
  LOOP UNTIL done
 
  a$ = isAnag$(anag$)
  IF a$ > "" THEN PRINT a$
 END IF
END SUB

The findings are:


1. gave       pied          tirade
 variegated
2. nib        crib          asset
 bassinet
3. mob        skip          lag
 gambol
4. drain      rule          cone
 ordinance
5. camp       eeriest       treasure
 masterpiece
6. host       die           tumult
 hoisted
 multitude
7. toil       erase         rebate
 obliterate
8. scent      cap           darn
 transcend
9. cape       hand          lead
 headland
10. cane      grace         glee
 elegance
11. forlorn   slime         bear
 miserable
12. cure      grit          ago
 courage
13. rib       odd           raze
 bizarre brazier
14. hole      fell          dims
 demolish
15. poise     fenced        coin
 confidence
16. vent      robe          stem
 verboten
 vestment
17. age       do            ripe
 dopier period
18. coup      trade         action
 occupation
19. core      rod           rot
 corrode
20. outer     fuse          arc
 surface

In 6, hoisted is not a synonym for tumult, so the correct answer there is multitude, as a synonym for host.

In 13, both bizarre and brazier can be formed from rib and raze, but only bizarre is a synonym for odd.

In 16, verboten is not a synonym for stem, but vestment is a synonym for robe.

In 17, period, rather than dopier, is a synonym for age.


  Posted by Charlie on 2012-07-08 17:42:21
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 (15)
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