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

Home > General > Word Problems
Specially Constituted Word (Posted on 2022-12-15) Difficulty: 3 of 5
Determine the longest possible word that contains exactly 4 of the vowels in alphabetical order.

*** Archaic/esoteric words are valid. However, slangs, acronyms/abbreviations, hyphenated words like X-ray, A-bomb are NOT permissible.
**** The half-vowel y is not considered as a vowel.
Note: The 4 different vowels are limited to one instance of a given vowel.

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Solution | Comment 1 of 10
Clearly the result will depend on the completeness of one's list of words.  The word list I have contains 46893 words in a list variable called "words".  There may be more solutions of the same word length, or longer words found in a more complete list.

I found:  brachypterous and transgression, each with 13 letters.
The word "brachypterous" means having rudimentary or abnormally small wings.

At first, I had a more complex algorithm until I realized I only had to reduce each word to its vowels and then check for one of five patterns.


----------
"words" is a list containing 46893 words

vowels = 'aeiou' #['a','e','i','o','u']
vowels4 = ['eiou','aiou','aeou','aeiu','aeio']
w1 = []
w2 = []

for w in words:
    vwlsOnly = ''.join(c for c in w if c in vowels)
    if vwlsOnly in vowels4:
        w1.append(w)

maxL = 0
for w in w1:
    maxL = max(maxL,len(w))
for w in w1:
    if len(w) == maxL:
        w2.append(w)
        
print(w2)

OUTPUT:  ['brachypterous', 'transgression']

  Posted by Larry on 2022-12-15 08:38:08
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