Optimal alphabetical order

Assume we have a list of all the words in the English language. Under the normal ordering of the alphabet in English (A, B, C, …, Z), some number of these words have all their letters in alphabetical order (for example, DEEP, FLUX, and CHIMPS). However, if we change the ordering of the alphabet, we will change the number of words having their letters in “alphabetical” order. What arrangement of the letters of the alphabet maximizes this number? What arrangement minimizes it?

The word list

A fairly standard list of English words is SOWPODS, which is the word list used in tournament Scrabble in most countries outside North America. We shall use this list as our starting point. Now, it is clear that any word that contains two instances of the same letter with a different letter between them (for example, POP) cannot have its letters in alphabetical order under any ordering of the alphabet, so we can discard such words straightaway. After we do so, we have 67,230 words remaining, from AA to ZZZS.

This list of words is available as words.txt. Each word in this file, including the last, is followed by a newline.

It should be noted that SOWPODS includes only words up to 15 letters, since a Scrabble board has only 15 squares on a side. I do not know of any English word longer than 15 letters that could potentially be in alphabetical order—it appears that all words with at least 16 letters have two instances of the same letter with a different letter between them. The longest words in the English language with no repeated letters, DERMATOGLYPHICS and UNCOPYRIGHTABLE, both have 15 letters. So it appears that this word list is reasonably complete.

Examples

Under the normal ordering of the alphabet (A, B, C, …, Z), the following 860 words have their letters in alphabetical order:

If the normal ordering is reversed, the following 628 words have their letters in order:

AA, BA, BAA, CAA, DA, EA, EBB, ED, EE, FA, FAA, FE, FED, FEE, FEEB, FEED, GED, GEE, GEED, HA, HE, HEED, ID, IF, IFF, IGG, IGGED, JA, JEE, JEED, JIB, JIBB, JIFF, JIG, JIGGED, KA, KEA, KEB, KED, KHEDA, KI, KID, KIF, KIFF, LA, LEA, LED, LEE, LEED, LI, LIB, LID, LIE, LIED, LIFE, LIG, LIGGE, LIGGED, MA, MAA, ME, MECCA, MED, MEE, MEED, MI, MIB, MIC, MICA, MID, MIFF, MIFFED, MIG, MIGG, MIHA, MM, NA, NE, NEB, NED, NEE, NEED, NIB, NID, NIE, NIED, NIFE, NIFF, NIFFED, OB, OBA, OCA, OD, ODA, ODD, OE, OF, OFF, OFFED, OGEE, OH, OHED, OI, OKA, OKE, OLD, OLE, OLEA, OLID, OLLA, OLLIE, OM, ON, ONE, ONIE, ONNED, OO, OOF, OOH, OOHED, OOM, OON, PA, PE, PEA, PEBA, PEC, PED, PEE, PEED, PI, PIA, PIC, PICA, PIE, PIED, PIG, PIGFEED, PIGGED, PLEA, PLEB, PLED, PLICA, PLIE, PLIED, PO, POA, POD, POGGE, POH, POI, POKE, POKED, POKIE, POL, POLE, POLED, POLJE, POLK, POLKA, POLKED, POLL, POLLED, POLLEE, POM, POME, POMMEE, POMMIE, POND, PONE, PONG, PONGA, PONGED, PONGEE, PONIED, PONK, PONKED, POO, POOD, POOED, POOF, POOH, POOHED, POOJA, POOK, POOKA, POOL, POOLED, POON, QI, RE, REB, REC, RED, REDD, REE, REED, RHEA, RIA, RIB, RIBA, RID, RIF, RIFE, RIFF, RIFFED, RIG, RIGG, RIGGED, ROB, ROC, ROD, ROE, ROED, ROJI, ROK, ROKE, ROKED, ROLE, ROLF, ROLFED, ROLL, ROLLED, ROM, ROMA, RONE, RONG, RONNE, RONNIE, ROO, ROOD, ROOF, ROOFED, ROOK, ROOKED, ROOKIE, ROOM, ROOMED, ROOMIE, ROON, SEA, SEC, SED, SEE, SEED, SH, SHA, SHE, SHEA, SHED, SHH, SI, SIB, SIBB, SIC, SIDA, SIF, SKA, SKEE, SKEED, SKI, SKID, SKIED, SKIFF, SKIFFED, SLED, SLEE, SLID, SMA, SMEE, SNEB, SNED, SNEE, SNEED, SNIB, SNIFF, SNIFFED, SNIG, SNIGGED, SO, SOB, SOBA, SOC, SOCA, SOD, SODA, SOFA, SOG, SOGGED, SOH, SOJA, SOKE, SOL, SOLA, SOLD, SOLE, SOLED, SOLI, SOLID, SOM, SOMA, SOME, SON, SONE, SONG, SONIC, SONNE, SOOGEE, SOOGEED, SOOK, SOOKED, SOOL, SOOLE, SOOLED, SOOM, SOOMED, SOON, SPA, SPEC, SPED, SPEED, SPIC, SPICA, SPIE, SPIED, SPIF, SPIFF, SPIFFED, SPLIFF, SPOD, SPOKE, SPOKED, SPONGE, SPONGED, SPOOF, SPOOFED, SPOOK, SPOOKED, SPOOL, SPOOLED, SPOOM, SPOOMED, SPOON, SPOONED, SPOONFED, SRI, TA, TE, TEA, TEC, TED, TEE, TEED, THE, THECA, THEE, THEED, TI, TIC, TICCA, TID, TIE, TIED, TIFF, TIFFED, TIG, TIGE, TIGGED, TO, TOC, TOD, TOE, TOEA, TOED, TOFF, TOFFEE, TOG, TOGA, TOGE, TOGED, TOGGED, TOKE, TOKED, TOLA, TOLD, TOLE, TOLED, TOLL, TOLLED, TOLLIE, TOM, TOMB, TOME, TOMIA, TOMMED, TOMMIED, TON, TONE, TONED, TONG, TONGA, TONGED, TONIC, TONK, TONKA, TONKED, TONNE, TOO, TOOK, TOOL, TOOLED, TOOM, TOOMED, TOON, TOONIE, TREE, TREED, TRIE, TRIED, TRIFF, TRIG, TRIGGED, TROD, TROG, TROGGED, TROKE, TROKED, TROLL, TROLLED, TROLLIED, TRON, TRONA, TRONC, TRONE, TRONK, TROOLIE, TSK, TSKED, UG, UGGED, UH, UKE, ULE, UM, UMM, UN, UNFED, UNFEED, UNI, UNKED, UNKID, UNLED, UNLID, UP, UPLED, UPO, UPON, UPPED, UR, URB, URD, URE, UREA, URGE, URGED, URIC, URN, URNED, URP, URPED, US, USE, USED, USNEA, UT, UTA, UTE, UTS, VEE, VIA, VID, VIE, VIED, VIFDA, VIG, VIGA, VOE, VOID, VOL, VOLA, VOLE, VOLED, VOLK, VOMICA, VROOM, VROOMED, VUG, VUGG, VUM, VUMMED, WE, WEB, WED, WEE, WEED, WHA, WHEE, WICCA, WIFE, WIFED, WIG, WIGGA, WIGGED, WO, WOE, WOF, WOG, WOK, WOKE, WOKKA, WOLD, WOLF, WOLFED, WOMB, WON, WONGA, WONK, WONNED, WOO, WOOD, WOOED, WOOF, WOOFED, WOOL, WOOLD, WOOLED, WOOLIE, WOOLLED, WOON, WOONED, WRIED, WROKE, WRONG, WRONGED, WUD, WULL, WULLED, WURLIE, WUS, WUSS, XI, XU, YA, YE, YEA, YEED, YID, YLKE, YO, YOB, YOD, YOGA, YOGEE, YOK, YOKE, YOKED, YOKKED, YOLD, YOLK, YOLKED, YOM, YON, YOND, YONI, YONIC, YONNIE, YOOF, YTTRIA, YTTRIC, YU, YUCA, YUCCA, YUG, YUGA, YUK, YUKE, YUKED, YUKKED, YULE, YUM, YUP, YUPON, YUPPIE, YUS, YWROKE, ZA, ZEA, ZED, ZEE, ZIFF, ZIG, ZIGGED, ZO, ZOA, ZOEA, ZOIC, ZOL, ZONA, ZONDA, ZONE, ZONED, ZONK, ZONKED, ZOO, ZOOEA, ZOOID, ZOOM, ZOOMED, ZOON, ZOONED, ZOONIC, ZUPA, ZURF, ZYGA, ZYME, ZYMIC, ZZZ, ZZZS.

Current records

Maximum

CountOrderingDiscovererDate
4046FCBWHJLOAQUXMPVINTKGZERDYSBrian Kell21 Sept 2010
4039BCPWMFJHOQURAVXINGTZLKEDYSBrian Kell21 Sept 2010
4022PBCWMFJHOAQUVXINGTZLKERDYSMatt Johnson21 Sept 2010
2619CGBFRHOPLATWQJUIVMKENDZXYSMarla Slusky19 Sept 2010
2412BSFPWCHJQMOAVUIRNGLKTDZEXYWinner of “Search for Gold” contest, early 1970s; reported by Ross Eckler in Making the Alphabet Dance
860ABCDEFGHIJKLMNOPQRSTUVWXYZ

Minimum

CountOrderingDiscovererDate
108IUXAOESYTFKQPZBMHCDLGNVJWRBrian Kell21 Sept 2010
109UIXAOESYHKTCPBZGDFMLNRWVQJBrian Kell20 Sept 2010
120IUAOESYHDBFGJKMQTNVPLWXZCRBrian Kell20 Sept 2010
128UIAOEYSDBPMHTGNLRKCFWVJQXZDarryl Francis; reported by Ross Eckler in Making the Alphabet Dance
139UAOEYJQXVGMHKTPSZDBFCNRLWIReported by Ross Eckler in Making the Alphabet Dance
155HLMNRWBCDFGJKPQTVXZSYEIUAOReported by Ross Eckler in Making the Alphabet Dance
628ZYXWVUTSRQPONMLKJIHGFEDCBA

Tools

I have written a little Perl script, count.plx, that will count the number of words in words.txt having all their letters in order according to a given ordering of the alphabet. To run this script from a Unix-like shell, put it in the same directory as words.txt, make sure it’s executable (chmod 755 count.plx), and give the ordering of the alphabet on the command line:

```\$ ./count.plx ABCDEFGHIJKLMNOPQRSTUVWXYZ
860 words in alphabetical order using ABCDEFGHIJKLMNOPQRSTUVWXYZ.```

Last updated 15 January 2010. Brian Kell <bkell@cmu.edu>