- Which common three letter word can be suffixed to (placed after) each of B, D, F, G, H, N, P, R, S, T, W and Y to generate twelve new words?
- Which common three letter word can be suffixed to each of ST, GR, BR, S, L and H to generate six new words?
- Which common three letter word can be suffixed to each of B, F, H, J, M, N, P, R, S, T and W to generate eleven new words.
- Which common three letter word can be suffixed to each of WAS, WIT, ZIT, FAT and GAT to generate five new words.
- Which common three letter word can be suffixed to each of F, H, P, CH and FL to generate five new words.
- Which common four letter word can be suffixed to each of B, L, F and Y to generate four new words.
- Which common four letter word can be suffixed to each of CHIN, BLAME, PAIN, COLOR and HARM to generate five new words.
- Which common five letter word can be suffixed to each of BOAT, CLUB, COOK, FARM and WORK to generate five new words.
- Which common five letter word can be suffixed to each of B, D, J, M, T and W to generate six new words.
Notes:
(a) Insertion or generation of any word involving plurals or a proper noun is not permissible.
(b) None of the generated words can be hyphenated. For example, words like A-bomb, X-Ray etc. are not allowed.
From the head:
1. Bear, Dear, Fear, Gear, Hear, Near, Pear, Rear, Sear, Tear (both of these), Wear and Year.
2.
3. Bail, Fail, Hail, Jail, Mail, Nail, Pail, Rail, Sail, Tail, Wail.
4. HER
5. AIR
6.
7. LESS ?
8.
9.
To fill in the missing, and check on the validity of #7:
DECLARE FUNCTION isWord& (wrd$)
CLS
DATA st,gr,br,s,l,h
FOR i = 1 TO 5
READ prefix$(i)
NEXT
OPEN "\words\words3.txt" FOR BINARY AS #1
w$ = SPACE$(3)
DO
GET #1, , w$
IF EOF(1) THEN EXIT DO
good = 1
FOR i = 1 TO 5
IF isWord(prefix$(i) + w$) = 0 THEN good = 0
NEXT
IF good THEN PRINT w$
LOOP
CLOSE 1
PRINT : PRINT
part6:
DATA b,l,f,y
RESTORE part6
FOR i = 1 TO 4
READ prefix$(i)
NEXT
OPEN "\words\words4.txt" FOR BINARY AS #1
w$ = SPACE$(4)
DO
GET #1, , w$
IF EOF(1) THEN EXIT DO
good = 1
FOR i = 1 TO 4
IF isWord(prefix$(i) + w$) = 0 THEN good = 0
NEXT
IF good THEN PRINT w$
LOOP
CLOSE 1
PRINT : PRINT
part7:
DATA chin,blame,pain,color,harm
RESTORE part7
FOR i = 1 TO 5
READ prefix$(i)
NEXT
OPEN "\words\words4.txt" FOR BINARY AS #1
w$ = SPACE$(4)
DO
GET #1, , w$
IF EOF(1) THEN EXIT DO
good = 1
FOR i = 1 TO 5
IF isWord(prefix$(i) + w$) = 0 THEN good = 0
NEXT
IF good THEN PRINT w$
LOOP
CLOSE 1
PRINT : PRINT
part8:
DATA boat,club,cook,farm,work
RESTORE part8
FOR i = 1 TO 5
READ prefix$(i)
NEXT
OPEN "\words\words5.txt" FOR BINARY AS #1
w$ = SPACE$(5)
DO
GET #1, , w$
IF EOF(1) THEN EXIT DO
good = 1
FOR i = 1 TO 5
IF isWord(prefix$(i) + w$) = 0 THEN good = 0
NEXT
IF good THEN PRINT w$
LOOP
CLOSE 1
PRINT : PRINT
part9:
DATA b,t,j,m,t,w
RESTORE part9
FOR i = 1 TO 6
READ prefix$(i)
NEXT
OPEN "\words\words5.txt" FOR BINARY AS #1
w$ = SPACE$(5)
DO
GET #1, , w$
IF EOF(1) THEN EXIT DO
good = 1
FOR i = 1 TO 6
IF isWord(prefix$(i) + w$) = 0 THEN good = 0
NEXT
IF good THEN PRINT w$
LOOP
CLOSE 1
DEFLNG A-Z
FUNCTION isWord (wrd$)
OPEN "\words\words" + LTRIM$(STR$(LEN(wrd$))) + ".txt" FOR BINARY AS #10
n = LEN(wrd$)
wrd1$ = SPACE$(n)
l = LOF(10) / n
low = 1: high = l
DO
mid = INT((low + high) / 2)
GET #10, (mid - 1) * n + 1, wrd1$
IF wrd1$ = wrd$ THEN isWord = -1: CLOSE 10: EXIT FUNCTION
IF wrd1$ < wrd$ THEN low = mid + 1: ELSE high = mid - 1
LOOP UNTIL low > high
isWord = 0
CLOSE 10
END FUNCTION
2. ain
and (only this one is common)
ave
ays
6. ears
east (only this one is singular)
ores
7. less
8. house
9. ailed
angle (only this one produces all common words)
owing
|
Posted by Charlie
on 2012-01-17 13:01:26 |