Queueing theory and regular expressions

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 they 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 23 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 queues 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.

Related posts The science of waiting in line What happens when you add a new teller?.

. More details

Leave a Reply