Queueing theory and regular expressions

people waiting in line

Queueing theory is the study of waiting in line. That may not sound very interesting, but the subject is full of surprises. For example, when a server is near capacity, adding a second server can cut backlog not just in half but by an order of magnitude or more. More on that here.

In this post, I’m not going to look at the content of queueing theory but just the name. When seeing the word queueing, many people assume it is misspelled and want to replace it with queuing. As I write this, my spell checker is recommending that change. But the large majority of people in the field call their subject queueing theory.

Queueing has five consecutive vowels. Are there any other English words with so many vowels in a row? To find out, I did an experiment like the classic examples from Kernighan and Pike demonstrating regular expressions by searching a dictionary for words with various patterns.

The first obstacle I ran into is that apparently Ubuntu doesn’t come with a dictionary file. However this post explains how to install one.

The second obstacle was that queueing wasn’t in the dictionary. I first searched the American English dictionary, and it didn’t include this particular word. But then I searched the British English dictionary and found it.

Now, to find all words with five consecutive vowels, I ran this:

    egrep '[aeiou]{5}' british-english

and got back only one result: queueing. So at least in this dictionary of 101,825 words, the only word with five (or more) consecutive vowels is queueing.

Out of curiosity I checked how many words have at least four consecutive vowels. The command

    grep -E "[aeiou]{4}" british-english | wc -l

returns 40, and the corresponding command with the file american-english returns 39. So both dictionaries contain 39 words with exactly four vowels in a row and no more. But are they the same 39 words? In fact they are. And one of the words is queuing, and so apparently that is an acceptable spelling in both American and British English. But as a technical term in mathematics, the accepted spelling is queueing.

Some of the 39 words are plurals or possessives of other words. For example, the list begins with Hawaiian, Hawaiian’s, and Hawaiians. (Unix sorts capital letters before lower case letters.) After removing plurals and possessives, we have 22 words with four consecutive vowels:

  • Hawaiian
  • Iroquoian
  • Kauai
  • Kilauea
  • Louie
  • Montesquieu
  • Quaoar
  • Rouault
  • aqueous
  • gooier
  • gooiest
  • obsequious
  • obsequiously
  • obsequiousness
  • onomatopoeia
  • pharmacopoeia
  • plateaued
  • plateauing
  • queue
  • queued
  • queuing
  • sequoia

It’s interesting that three of the words are related to Hawaii: Kuaui is an Hawaiian island and Kulauea is a Hawaiian volcano.

I’d never heard of Quaoar before. It’s a Kuiper belt object about half the size of Pluto.

More queueing theory posts

9 thoughts on “Queueing theory and regular expressions

  1. Standard /usr/share/dict/words on Mac OS X (Catalina, for what it’s worth) has several words with 5 or more vowels:

    $ perl -ne ‘print if /[euioa]{5}/’ /usr/share/dict/words
    cadiueio
    Chaouia
    euouae
    Guauaenok

  2. I have a word puzzle script in Perl, which takes Perl REs, and a large corpus of words to throw at it.

    Running it gives several words with 5 vowels, and 1 with 6:

    > words.pl -r ‘[aeiouAEIOU]{5,}’
    cadiueio
    cooeeing
    euouae
    miaoued
    miaouing
    queueing

  3. The Hawaiian language (and some other Polynesian languages) are notoriously short of consonant sounds. Kauaʻi and Hawaiʻi properly have glottal stops in them, but those usually get lost in English borrowings and then we get a vowel pileup.

  4. Hum, I thing your dictionnary is incomplete. You should use the ‘wbritish-insane’ one (or ‘wamerican-insane’) to do these sort of word counting / word searching.
    The default dictionnary only contains ‘common’ words.

    With the full dictionnary, there is much more words with 5 consecutive voyels.
    You even have a 6 consecutive voyels words: euouae (https://www.collinsdictionary.com/dictionary/english/euouae).

    Also, you could probably add the ‘y’ in the list of voyels :-).

  5. Back in the 1970s, a friend of wondered if one could use consonant clusters for hyphenation. Building and storing a separate hyphenation dictionary was rather a challenge back then. He collected consonant clusters and was surprised to find “chtsm”. The word, yachtsman.

    I suppose I should look for others, but it’s too easy nowadays. Why bother?

  6. Thank you.
    One more? giaour. Seems to be in dictionaries, at least in my 1968 Funk & Wagnalls.
    Among Muslims, a nonbeliever, especially a Christian.

  7. You may find more with a case insensitive search, since your base search misses words that start with a capital vowel like “Ueueteotl”.

    rg ‘[aeiou]{4}’ /usr/share/dict/words -i

Comments are closed.