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

Home > General > Word Problems
Lengthy Containment (Posted on 2012-05-02) Difficulty: 3 of 5
What is the longest English word(s) that can be produced from the letters contained in each of the following?

(1) TWO THOUSAND AND TWELVE
(2) DUO MILIA ET MILLE
(3) DEUX MILLE ET DOUZE
(4) ZWEITAUSEND UND ZWOLF
(5) TO TUSINDE OG TOLV
(6) TWEEDUIZEND EN TWAALF
(7) TVA TUSEN OCH TOLV
(8) DOS MIL DOCE
(9) DUE MILA E DODICI

** For example, the longest word that can be produced from the letters contained in "NUHRIAKMTE" is "RUMINATE". For some of the above phrases, there may exist more than one word having the maximum number of letters.

*** Proper nouns, acronyms, abbreviations, hyphens, spaces are not allowed. Number of occurrences of a letter in the word is limited to the number of occurrences in the phrase.

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 (spoilers) | Comment 1 of 2

Showing original letters, number used out of how many, fraction of letters used, and formed words:

original             used/  fract.  formed
letters out of used words




twothousandandtwelve 11/20 .5500  nonathletes
                                  woodenheads
duomiliaetmille      10/15 .6667  multimedia
                                  multimodal
deuxmilleetdouze     10/16 .6250  outduelled
zweitausendundzwolf  12/19 .6316  undefoliated
totusindeogtolv      12/15 .8000  deontologist
tweeduizendentwaalf  11/19 .5789  unalienated
tvatusenochtolv      10/15 .6667  convolutes
                                  touchstone
dosmildoce           8/10  .8000  miscoded
duemilaedodici       10/14 .7143  duodecimal
 

DATA TWOTHOUSANDANDTWELVE
DATA DUOMILIAETMILLE
DATA DEUXMILLEETDOUZE
DATA ZWEITAUSENDUNDZWOLF
DATA TOTUSINDEOGTOLV
DATA TWEEDUIZENDENTWAALF
DATA TVATUSENOCHTOLV
DATA DOSMILDOCE
DATA DUEMILAEDODICI
CLS

DIM maxWord$(22)

FOR iter = 1 TO 9
   READ source$
   numWds = 0
   source$ = LCASE$(source$)
   maxSize = 0
   OPEN "\words\words.txt" FOR INPUT AS #1
   DO
     LINE INPUT #1, w$
     s$ = source$
     good = 1
     FOR i = 1 TO LEN(w$)
       ix = INSTR(s$, MID$(w$, i, 1))
       IF ix = 0 THEN good = 0: EXIT FOR
       s$ = LEFT$(s$, ix - 1) + MID$(s$, ix + 1)
     NEXT
     IF good THEN
       IF LEN(w$) >= maxSize THEN
         IF LEN(w$) > maxSize THEN
            maxSize = LEN(w$)
            numWds = 1
         ELSE
            numWds = numWds + 1
         END IF
         maxWord$(numWds) = w$
       END IF
     END IF
   LOOP UNTIL EOF(1)
   CLOSE 1
   PRINT source$; TAB(22); LTRIM$(STR$(maxSize)); "/"; LTRIM$(STR$(LEN(source$)));
   PRINT TAB(28); : PRINT USING ".####"; maxSize / LEN(source$);
   FOR i = 1 TO numWds
     PRINT TAB(35); maxWord$(i)
   NEXT
NEXT iter

 


  Posted by Charlie on 2012-05-02 13:27:09
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 (0)
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