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

Home > General > Word Problems
Ascension (Posted on 2004-02-08) Difficulty: 3 of 5
  1. What is the longest word in the English language in which all the letters are arranged in alphabetical order?

  2. How about reverse alphabetical order?

  3. What is the last word, alphabetically, whose letters are all in alphabetical order?

  4. What is the first word whose letters are all in reverse alphabetical order?

See The Solution Submitted by DJ    
Rating: 4.3750 (8 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer Used | Comment 1 of 24
A computer search shows that "beefily" and "billowy" are the two longest words with letters in alphabetical order. If one doesn't like double letters (for strict monotonically increasing letter value), one letter shorter are "almost", "begins", "biopsy", "chimps", "chinos", "chintz" and "ghostly".

For reverse alphabetical order the longest is "trollied". One letter less avoids a double letter in "sponged" and "wronged".

The last "word" that the computer finds "in alphabetical order" is just "x". As there might be considered problems with that, the next-last is "tux", and after that (actually, before, in the alphabet), is "sty".

For reverse alphabetical order of its letters, the first word found is "a", whose letters are both in reverse alphabetic order as well as alphabetic order. The same quibble can be made about the second word found, "aa" (a type of lava). Then comes "ba", not too common a word. Then comes "ebb". The only problem for the purist here is the double letter. Then come "ed" (as in "sex ed" or "driver's ed") and "fa" (a note on the diatonic scale--or a long, long way to run in the Sound of Music). But a word that all can agree is common enough is "fed".

The program is:

wdLim = 25
REDIM save$(wdLim)
OPEN "words.txt" FOR INPUT AS #1
DO
 LINE INPUT #1, l$
 IF LCASE$(l$) = l$ THEN
   good = 1
   FOR i = 2 TO LEN(l$)
     IF MID$(l$, i, 1) < MID$(l$, i - 1, 1) THEN good = 0: EXIT FOR
   NEXT
   IF good THEN
      IF LEN(l$) > 5 THEN
        PRINT l$
      END IF
      IF LEN(l$) > LEN(save$(wdLim)) THEN
        FOR i = 1 TO wdLim
          IF LEN(l$) > LEN(save$(i)) THEN
             FOR j = i TO wdLim
               SWAP save$(j), l$
             NEXT
             EXIT FOR
          END IF
        NEXT
      END IF
   END IF
 END IF
LOOP UNTIL EOF(1)
'FOR i = 1 TO 25
' PRINT save$(i)
'NEXT
CLOSE


wdLim = 25
REDIM save$(wdLim)
OPEN "words.txt" FOR INPUT AS #1
DO
 LINE INPUT #1, l$
 IF LCASE$(l$) = l$ THEN
   good = 1
   FOR i = 2 TO LEN(l$)
     IF MID$(l$, i, 1) > MID$(l$, i - 1, 1) THEN good = 0: EXIT FOR
   NEXT
   IF good THEN
      IF LEN(l$) > 6 THEN PRINT l$
      IF LEN(l$) > LEN(save$(wdLim)) THEN
        FOR i = 1 TO wdLim
          IF LEN(l$) > LEN(save$(i)) THEN
             FOR j = i TO wdLim
               SWAP save$(j), l$
             NEXT
             EXIT FOR
          END IF
        NEXT
      END IF
   END IF
 END IF
LOOP UNTIL EOF(1)
'FOR i = 1 TO 25
' PRINT save$(i)
'NEXT
CLOSE

wdLim = 25
REDIM save$(wdLim)
OPEN "words.txt" FOR INPUT AS #1
DO
 LINE INPUT #1, l$
 IF LCASE$(l$) = l$ THEN
   good = 1
   FOR i = 2 TO LEN(l$)
     IF MID$(l$, i, 1) < MID$(l$, i - 1, 1) THEN good = 0: EXIT FOR
   NEXT
   IF good THEN
             FOR j = 1 TO wdLim
               SWAP save$(j), l$
             NEXT
   END IF
 END IF
LOOP UNTIL EOF(1)
FOR i = 1 TO wdLim
  PRINT save$(i)
NEXT
CLOSE


wdLim = 25
REDIM save$(wdLim)
OPEN \"words.txt\" FOR INPUT AS #1
wCt = 0
DO
 LINE INPUT #1, l$
 IF LCASE$(l$) = l$ THEN
   good = 1
   FOR i = 2 TO LEN(l$)
     IF MID$(l$, i, 1) > MID$(l$, i - 1, 1) THEN good = 0: EXIT FOR
   NEXT
   IF good THEN
    wCt = wCt + 1
    IF wCt <= wdLim THEN
     save$(wCt) = l$
    END IF
   END IF
 END IF
LOOP UNTIL EOF(1)
FOR i = 1 TO wdLim
  PRINT save$(i)
NEXT
CLOSE


  Posted by Charlie on 2004-02-08 11:09:34
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 (3)
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