The best so far is "nowhere/abjurer".
mark
OK, this may take all the fun out of it, but in our 98,294-word
/usr/dict/words at JvNC, nowhere/abjurer is the longest rot13 pair.
Here's how I figured it out (just a matter of using the right tools
:-) ):
1. tr < /usr/dict/words A-Z a-z | sort | uniq > dict.orig
2. tr < /usr/dict/words A-MN-Za-mn-z n-za-mn-za-m | sort | uniq > dict.rot13
3. cat dict.orig dict.rot13 | sort > dict.combined
4. uniq < dict.combined -d
Steps 3 and 4 could be performed in a single pipeline if desired.
Anyone have a bigger /usr/dict/words?
----------- The opinions expressed in this article are solely mine. -----------
<Insert lame attempt at disclaimer humor>
sss/PU'94 Dept of CS (spe...@phoenix.princeton.edu)/JvNCnet (spe...@jvnc.net)
Judgement comes from experience. Experience comes from poor judgement.
Gee, and I thought I was the only one weird enough to pipe /usr/dict through
rot13 and spell, and back again. That is the longest pair I found too.
Although, there are two other interesting sets.. tang and gnat (pallindromic
rot13 pairs) and my personal favorite Terra and Green.
(and no, I don't have too much free time to kill.. I discovered this when I
was back in college, and DID have too much time on my hands. :-)
Jesse
--
Jesse Mundis | Amdahl Corporation | Freedom is just chaos
je...@uts.amdahl.com | 1250 East Arques Ave M/S 316 | with better lighting.
(408) 746-4796 | Sunnyvale, CA 94088-3470 | -Alan Dean Foster
#include <Disclaimer.standard>
This is the longest pair I know about. Another shift pair of length
7 is sulphur/primero (but with shift length 1).
This is related to a contest running in REC (sponsored by me); the
first person to find a legitimate shift-pair of length 8 or more
wins $20. If you find such a pair, contact me and I'll tell you
how to get in touch with the editor of REC.
--
Chris Long, 265 Old York Rd., Bridgewater, NJ 08807-2618
"In a study of schoolboys, an educator discovered a correlation between size
of feet and quality of handwriting. The boys with the larger feet were,
on the average, older." Wallis & Roberts, _The Nature of Statistics_
>Mark Schnitzius writes:
>> This is actually going on in talk.bizarre but
>> belongs here. What is the longest word that
>> rot13's to another word?
>> The best so far is "nowhere/abjurer".
>This is the longest pair I know about. Another shift pair of length
>7 is sulphur/primero (but with shift length 1).
>This is related to a contest running in REC (sponsored by me); the
>first person to find a legitimate shift-pair of length 8 or more
>wins $20. If you find such a pair, contact me and I'll tell you
>how to get in touch with the editor of REC.
I can feel an exhaustive list coming on...
All you have to do is make a one of those bogus multiwordcombinations
(with an even more bogus (rot) rot version) from one of these lists:
ROT1...
be bee beefs beet bet bi bib bijou bo bob boo boob boot bouffe bout by
bap di dib dibs dabs ef eff effs eft eve evet fife fit foe foh fub fy
gju hobs if ifs jeff jet jo jolt jot jut jabs lips live lobs nip nob ob
of off op ope oppo ops opt pe pee peps pet pi pin pint pip pit po pot
pst sip spet spoof spout ti tiffs tift toff toffs tope toph tubs tuffe
tuffet tuffs ufo up upo ups vet aby aff apt ava
ROT2...
cig cor cow cum cur cwm caw da dag ecru egg eta ewt fag gju gnu go gog
goaf gu gym gag ha hang jag jar keg kea kor ma mag nag oca ow pa rag
rake two tag uke unci unco urge uva vum vara wink wo ygo yang yapp act
aw
ROT3...
dee deed deev derv deb dod dods doe doh doo doob dos dow dued dui dun
dup dured dub dzo da dado dah eddo eh el er ere ered erg erk ern err
ers era exon forb fob free fro frog frow frug fra frab fuds furs fub
grow grub grab gude gule guls gurs gub hi ho hog hoi hon hoo hop how
huh hun ha id ide ids ire irk iron jole jors li loo od ode ods oda ohs
ole olpe or ore ors ora orb pho plow pre pro prod prog proo prow pruh
prad re reh rev rood rud rue rug sh shed shh shod shoo show shul shun
slob slab sods sorb sob sulphur sur surd sub uds ule ure urn vols who
whorl whow wuds xu yob ax breer brog clod
ROT4...
ee eel eff efs eh ehs eke el em eme epoch er ere err errs ewt ex ea ear
fee fer ferm ferns fet few fewer fear figo fir firm firn fix fid flip
get gets gimp gip git glia glid he help hep her herms hero het hew hear
hi him hip hic iff irk jerk jerks jet jew kef keir kens kep kepi kerne
ket kets kex key kier kip kir kiri ksar ky lei leir lek leps let levo
lew lex lea li limp lit liar lib lyme laer nef nek net newt nix oe oik
olm oryx os ose pe peg pepper pere peri perk pet pew pea pear pec pie
pier piet pirs pit pix pize pia pic psst pst pyre pyro pyxie re ref rei
reke ret rete rew rex rec rit ria sex sh she shew shh si soil spie sri
st step stir stive sai sap sar sax te teg tegs tel temp tete tew tea
tear ti tie tier tig tiger tipi tiro tit tits tsar tyne typo typp typy
tyre tyro tyte vet vex vexer vezir vier vim viver via wem wept wet
wetter wex wey wear web wed wig wimp wive woe wast xi zea aero ai air
ale als as ask ass by cel cero ciel cit deb die dip divs
ROT5...
firns fit fix fie fuji fy fat fet fets if ifs in ins ions it its knit
knee kneed nix ny ons one st sty ti tux twit un uns ut utu ute zit ene
et
ROT6...
gink gju gnarr go gog gor gory gos got gox goy grungy gal gey ho hoh
hoik holly homme homy horme hot hoy hug hugy huh hull hully hum hun
hurry hush hushy hushed hut huzzy hue hah haj hall hallo ham harry has
hat hay hazy hazer hae haff he hey in ingo ingot ink irks ire jo join
joky jot jour job juju jun jury jus jut jak jam jark kin kink kinky ky
lor lorry lory lot lox lugs lum lumme lunt lutz lux lud lah lall lam
las lase lat lax layout mo mol mom mot mott motte mou movy moy moys moz
mu mug mull mum murk murks murky murl murly murre mut mux mud ma mak
mall mar marg mark marl marly marle marry mare mas masse mat matte maty
max may mazy mae mes mete no nos not noy nu nun nurs nut nam name nan
naoi nark narky narre nas nat navy nek nest oik ou out oy oys obe poh
poll polly pom pompom posse pot pott potto potty puh puke pumy punt
punty purr pam papa pat pay roin rok roky rom rore rost rose rot rotas
rote rout rugs ruin rum rume rusk ruc ruck rud rue raga raik raj rally
ram ras rasse rate rax rayne rad res skry sky ska so soh sorry sos sox
soy sozin sod suing suk sum sur surgy sure sus sue suer sain sall sally
sam sarin sark sarky sarsar sarzas sass sassy sasse sat satin saut say
sayne saz sad toll tor torr tory toy toyo tod tum tummy tun tusk tusky
tut tux tuzz tubas ta tarry tash tat tax tazze te ugly un uns us ut
udos uey vote vox vug van varve vary vara vare vase vat vav vae veg wag
wage wake ygo yo york yos yod yu yah yak yaw yawy yay yet yeti zo zuz
zek ake am ark as at atmas ax ay bog bogy bok bos bot bourg boy boyg
bur burg burk bury but bud bam bas coin cork corky core cot cott cote
coy coz cozy cum curl curly cush cushy cut cuz cud carr carry do da emu
erks ea folly fozy fug
ROT7...
hila ho hoh holt huh hup hups hurly hyla hyps ha hath he heps ilk ill
illy ivy if jo jolly khi lo luz lym la lah mho noll nub oh oho old ole
op opt ova oval ovals obi pile pur purply pa pah ruby sh shul shun shy
shaly shale she spun spur spa thumbs thy the ups uvula uva vealy who
why wha wolly wold wop wyle zo zoo zobu zupa ah ahoy aha all alls ally
alps als alula aptly ava aval aba by ba bah bal cha clot dhal doh doll
dolls dolma dopy dopa fila flu flap glib gov
ROT8...
ill inn ism ita if jinn jism jiz jib jibb jig kits kiva li linn lip lis
lit lie lies lig law mi miz mib mica mna moil moit moo mow mowa mu mum
ma mama mem mes mesa nil nip nipa nix nizam nib nie oil omit orc orca
ow owl owes oca pi pila pima pinna pip pipa pir pitta piu pium pix pia
pias pie pies pig riz rig si sim sima sib spiv ti tika til tip tid tie
ties tig twin two twa uit um ug vim viva via win wis wiz we wem wet web
xi zila zip zig ail aim ait ami amia ambit apism aqua asci aw awl awa
awe acts agma bi bima bio bis bits bitt biz bias bib bibb bid baiza bas
cop cam dika dim div diva dib did die eiks em emit emma emu ewks ewe
egma gi ginn gip gis gizz gie gig
ROT9...
jun jab knub knap kana karn khan lark lad laden lah mark mix no noo nob
nu numb nut nub na nan nap nat nab ora orc oud oxy oda oh pro pry pram
prau roo rob rung rut ran rat reh snath sri try uni ur urn urena wry
yang yah an ann anno any ane ark arm ary arc arena blah brut bra bran
brin bunn bunny bury byrl byre bar barb croc cru cry cran cann cant
carn carp dun dung da dam damn dan daw enarch eng ern frena fah gnarl
honan harem inn
ROT10...
ko kep lo loke loo loop lox lobo lew lex led lei li lido mono mons moo
moz mel melon men mew no noo noon nos nowy nog noh ny neon nevi oke
okeh oo op or orc ow owe ox ob od odes oh poo poon pood pox pod poi pyx
pye pyic pen pets pew pi roon row rob roc rod repp rew rex red rivo riz
snow too toon tore tod toe tog tyg ten tete ted von voe wo woon wood
wow wox wock woe wog wry wye we wen wex wed weewee xi yo yuk ye yen ygo
zo zoo zoon zobo zobu zel zed bo bon bony boo boon bop bor bos bow box
bod bog boh bel ben benni beck bed bio commy con coo coon cos cows cox
cob cobb coco cod cog cogon croc credo cel cion do don doo doob dop doc
dodo dog drow dry dso dyed del des dew dex dido ex ebony foh few go gon
goo goon good gouk gowl gox gobo god grog gen gio he io jole
ROT11...
lo loo lote lye lap lep li lip olm old olds op oppo opt octad oft ply
pled pos pote poted pe pele pens pes pi slop slut sly sled spy spa spae
sped st stop sty stye styed stens sted to top tod te tel teld tens ted
upled ufo yes zo zoo zap alod als alto ala alap ale ales apod ape aped
at atap ate ates azo afald blot bled clop clod cly clap clasp clad dzo
dal dale date dated dawted daze dazed de defy el elm elt eld elds elf
elfed espy et eta etat etens eft fy fa fad fed glop gled it if
ROT12...
mna moup mu mum mux mud my myna me met mew mi mim mix miz nu nun nurr
nus na nam name nan nap nape narre nas nat naan nab nae naff nala oaf
oak ogee pun pup pupa pupae pus puy pub puff puh pa pan pane pap papa
pape parr pas pase pat pate pax pay pad pair pea run rune rusa ruse rud
rude ruff ruffe ran ras rase rat raze rad rag ragde rage raj rake smeek
sun sup supe suq sur surf sus sub sudd sue sam samp same san sane sank
sap saz sad sae sair sake sky tup tub tube ta tam tame tan tana tane
tao tap tape tas tass tasse taste tat tate tau tab tae tai taj tak take
up ur ure uey van vane vas vase vade wud wame wan wane warre wab wad
wade wae xu ympe yu yup yus ya yam yap yay yaff yak zap an ane ape ar
arf at ate ay aye aa abba ad ado adsum ae ai ake bum bus buaze bub bud
bug ba bam bap bask bat bay baye baa babe baff baize bal ball beef dun
dune dup dupe durr dub duff damp dan dap daw dawk day ems emu et etude
etas ewk eyas ea ean eas ease eat eaux ef eik furr fuse fuze fub full
fa fank fap fas faux fay fayne faze fab fad fado fade fadge fagot faik
fake few gynae gybe hum hue hulk had haj imp ita ka kane kaw kay kae
kai kaie lube lull la lam lana lang
ROT13...
non noo noon nowhere nob nu nun na nan nana navy naan nag ne nene neon
nep nef nib on onyx one oner ones or orra ort ora ova ob obe oho pry
pun puny pung pur purs pure purer penny pent pening perry pho roo roof
rat rail re ren res ret rex rear ree reef ref snar snab sneb sync sybbe
sen sent senvy serr serre serer sel shool shat she sheel try trez tung
tane tang terra tehr tho thy the they un ur ure urea uva vex wha when
an anna ant ana anan anil ar ars arar arba arc avo abo aba abb abba
abjurer ah aha bo bor bub ba bar bare barf balk be ben been beg bin
cravat craal crag creel cub cel cha chat chal che cher chere chef envy
eng er erne err errs ers era erf erg erk ebb ebbs fry fra frag frail
frere free freer fung fur furry fubby fano fane faro floor flap gnar
gnat grue green gur gurl gub gul germ gel ghat ha he her hern hin irk
jun jura
--
Warwick
--
_-_|\ war...@cs.uq.oz.au /Disclaimer:
/ * <-- Computer Science Department, /
\_.-._/ University of Queensland, / void (if removed)
v Brisbane, Australia. /
I know some dandies using shift-26. 8-)
Tim
Other interesting bits are:
irk/vex which are rot13 pairs and synonyms
tang/gnat which are rot13 and palindrome pairs
Also, "the rug gary lent" rot13 turns into "gur eht tnel yrag" (read backwards)
Here's my program from the International Obfuscated C Code Contest, 1989
It rot13s and/or reverses text, and works if the source is rot13 and/or
reversed. Compile as:
cc -Dtrgpune=putchar prog.c -o prog
---cut here---
/**//*/};)/**/main(/*//**/tang ,gnat/**//*/,ABBA~,0-0(avnz;)0-0,tang,raeN
,ABBA(niam&&)))2-]--tang-[kri - =raeN(&&0<)/*clerk*/,noon,raeN){(!tang&&
noon!=-1&&(gnat&2)&&((raeN&&( getchar(noon+0)))||(1-raeN&&(trgpune(noon
)))))||tang&&znva(/*//**/tang ,tang,tang/**|**//*/((||)))0(enupgrt=raeN
(&&tang!(||)))0(rahcteg=raeN( &&1==tang((&&1-^)gnat=raeN(;;;)tang,gnat
,ABBA,0(avnz;)gnat:46+]552&)191+gnat([kri?0>]652%)191+gnat([kri=gnat
(&&)1-^gnat(&&)1& ABBA(!;)raeN,tang,gnat,ABBA(avnz&&0>ABBA{)raeN
,/**/);}znva(/*//**/tang,gnat,ABBA/**//*/(niam;}1-,78-,611-,321
-,321-,001-,64-,43-,801-,001-,301-,321-,511-,53-,54,44,34,24
,14,04,93,83,73,63,53,43,33,85,75,65,55,45,35,25,15,05,94,84
,74,64,0,0,0,0,0,0,/**/){ABBA='N'==65;(ABBA&&(gnat=trgpune
(0)))||(!ABBA&&(gnat=getchar(0-0)));(--tang&1)&&(gnat='n'<=
gnat&&gnat<='z'||'a'<=gnat&&gnat<='m'||'N'<=gnat&&gnat<='Z'
||'A'<=gnat&&gnat<='M'?(((gnat&/*//**/31/**//*/,21,11,01,9,8
,7,6,5,4,3,2,1,62,52,42,/**/)+12)%26)+(gnat&/*//**/32/**//*/,
22,12,02,91,81,71,61,51,41{=]652[kri};)/*pry*/)+65:gnat);main
(/*//**\**/tang^tang/**//*/,/* */,~/*//*-*/tang,gnat,ABBA-
0/**//*/(niam&&ABBA||))))tang( rahcteg&&1-1=<enrA(||))tang(
enupgrt&&1==enrA((&&)2&gnat(&& )1-^tang(&&ABBA!(;)85- =tang
(&&)'a\'=gnat(&&)1-==gnat(&&)4 ==ABBA(&&tang!;))))0(enupgrt=
gnat(&&)tang!((||)))0(rahcteg =gnat(&&tang((&&ABBA;;)1-'A'=!
'Z'=tang(&&ABBA{)enrA/***/);gnat ^-1&&znva(tang+1,gnat,1+gnat);
main(ABBA&2/*//*\\**/,tang,gnat ,ABBA/**//*/(avnz/**/);}/*//**/
---cut here---
Here is the hint file:
Most algorithms in one program: <westley@starfire> Merlyn LeRoy (Brian Westley)
Merlyn LeRoy (Brian Westley)
Starfire Consulting
1026 Blair Ave.
St. Paul, MN
55104
USA
Judges notes:
There is a secret way to get ONE of the versions to print out
"Hello, world!\n". Can you find how to do it?
Try the following commands:
westley < westley.c > ver0.c
westley 1 < westley.c > ver1.c
westley 1 2 < westley.c > ver2.c
westley 1 2 3 < westley.c > ver3.c
Try compiling and running the 4 resulting programs.
Selected notes from the author:
This is a filter. If it is run with no arguments, it copies
stdin to stdout. With one argument, it ROT13's stdin to
stdout. With two arguments, it reverses stdin to stdout. With
three arguments, it does both. It requires the ASCII character
set, with all characters being in 0..255, and EOF must be -1.
Also requires two's complement (I think).
The source code will run if ROT13'ed and/or reversed, using a
different algorithm for each version (hereafter referred to as
ver0 (original), ver1 (ROT13), ver2 (reversed), and ver3
(ROT13 and reversed)).
When compiling these versions, one needs to define 'trgpune'
in the compile line. Example:
cc -Dtrgpune=putchar ver3.c -o ver3
"trgpune" is the ROT13 of getchar(), so getchar() and putchar()
are exchanged in the ROT13 counterpart. It is easy to see that
this is unavoidable. I must have a #define for a library
function; otherwise I would have an unidentifed extern for the
ROT13 version. If I then define this function, it won't link
in the library version for the ORIGINAL code, since my
definition will supercede the library function. Hence, the
compiler option gives me putchar(), and allows me to use
getchar(). I pass a dummy argument to getchar() to eliminate
"variable number of args" from lint (unless it checks against
the library). Otherwise, all versions lint reasonably (main
returns random value & constant in conditional context [when I
check for ROT13 version] is all it complains about).
ver0 and ver1 use a range check and a calculation to do ROT13,
while ver2 and ver3 use table lookup. All versions contain
main() and it's ROT13 fn, znva(). ver0/ver1 [ver2/ver3] are
(of course) syntactically identical, since the syntax is in the
non-alphabetic characters. However, since one program starts
at main() while it's ROT13 counterpart starts at znva(), znva()
calls main (znva() is also used for output).
All versions use recursion to work. If the program is NOT
reversing it's output, it prints out the (possibly ROT13'd)
character before recursing, otherwise it prints it out
afterward (or doesn't recurse at all when EOF is reached).
Since most of this code is identical, it is put into znva() and
called with a first parameter of 0 as a flag (as "main()", it's
first argument (argc) must be at least one).
I can't use any flow control. If I used if(), I would have a
function vs() to define in the ROT13 version. But a function
called vs() turns into a function called if() in the original,
so it can't be done. Therefore, I do:
expr1 && expr2 && (expr3=etc);
which is the same as:
if (expr1 && expr2) expr3=etc;
A/UX (1.1.1) on the Macintosh doesn't get this right; it evaluates ALL
expressions if they aren't in an assignment or conditional
statement. This might warrant a warning, since other compilers
may do this. I found MANY compilers botched:
expr1 && (expr2,expr3);
expr2 was OFTEN evaluated even if expr1 was false. I removed
such statements to make it more portable.
The variable names are worth noting:
'irk' and 'vex' are ROT13 pairs and are synonyms.
'Near' and 'Arne' are ROT13 pairs and are anagrams.
'NOON' and 'ABBA' are ROT13 pairs and are palindromes.
'tang' and 'gnat' are both ROT13 and palindrome pairs!
Normally (!), a reversible C program is done thus:
/**/ forward code /*/ edoc drawkcab /**/
If your compiler nests comments, it will get this wrong.
However, I have made some bits of the code palindromic,
(or different, but reversible) so it is more like:
/**/forward/*//**/ palindromic /**//*/drawkcab/**/
The code can therefore be interlaced. There are eight
such palindromic bits. You can find them within the
/*//**/ /**//*/ pairs.
The body of the code of ver0 and ver1 is a large lumpy 'K' (for
Kernighan); the code of ver2 and ver3 is a flat-topped and
lumpier 'R' (for Ritchie). Judicious use of spaces and tabs
helped here. It barely fits on an 80x24 screen. Squint. Note
that the code must start with a blank line, or the reversed version
will lack a terminating newline.
---
Merlyn LeRoy
>irk/vex which are rot13 pairs and synonyms
>tang/gnat which are rot13 and palindrome pairs
>Also, "the rug gary lent" rot13 turns into "gur eht tnel yrag" (read backwards)
The name "chupchup", which belongs to a MUD character, is
a rot13 pair backwards.
>Here's my program from the International Obfuscated C Code Contest, 1989
One winner in 1991 was a rot13 one-liner; the hint file for
it had several sample sentences which rot13'd to other sentences.
I believe the file was "fine.hint"; the IOCCC releases are available
from ftp.uu.net.