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

 Double Derangement Anagrams (Posted on 2007-12-05)
Many words have two or more anagrams, like 'tame' has anagrams of 'mate' and 'meat'.

The pair 'tame' and 'meat' are not only anagrams but are derangements of each other as well, having no letter occur in the same spot in both words.

Can you find a set of three words which are all derangements of each other?

 See The Solution Submitted by Brian Smith Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 computer solutions | Comment 5 of 10 |

The following program reads from a file that serves as an anagram dictionary. This dictionary file has a record for each word in the regular word list, but before the word the file has the word's letters arranged alphabetically, followed by a space. For example, just around the first set of words that solve this puzzle, the following records appear:

`...abcep becapabceps becapsabcepsssu subspacesabcepssu subspaceabcer acerbabcer braceabcer caberabcerr bracerabcerrs bracersabcerrssttu subtractersabcerrsttu subtracter...`

The program holds in an array the words that have the same anagram (in this case abcer) and finds sets of three that are mutually deranged (in this case acerb, brace and caber).

DIM word\$(20)

OPEN "anagdict.txt" FOR INPUT AS #1
OPEN "dblderng.txt" FOR OUTPUT AS #2
DO
LINE INPUT #1, l\$
l\$ = LTRIM\$(RTRIM\$(l\$))
ix = INSTR(l\$, " ")
a\$ = LEFT\$(l\$, ix - 1)
w\$ = MID\$(l\$, ix + 1)
IF a\$ <> prevA\$ THEN
GOSUB analyze
subs = 1
ELSE
subs = subs + 1
END IF
word\$(subs) = w\$
prevA\$ = a\$
LOOP UNTIL EOF(1)
GOSUB analyze

END

analyze:
good2 = 0
FOR i = 1 TO subs
FOR j = 1 TO subs
FOR k = 1 TO subs
good = 1
FOR ix = 1 TO LEN(word\$(i))
IF MID\$(word\$(i), ix, 1) = MID\$(word\$(j), ix, 1) THEN good = 0: EXIT FOR
IF MID\$(word\$(i), ix, 1) = MID\$(word\$(k), ix, 1) THEN good = 0: EXIT FOR
IF MID\$(word\$(k), ix, 1) = MID\$(word\$(j), ix, 1) THEN good = 0: EXIT FOR
NEXT
IF good AND word\$(k) > word\$(j) AND word\$(j) > word\$(i) THEN
PRINT word\$(i), word\$(j), word\$(k): good2 = 1
PRINT #2, word\$(i), word\$(j), word\$(k): good2 = 1
END IF
NEXT
NEXT
NEXT
IF good2 THEN PRINT : PRINT #2,
RETURN

The findings:

`acerb         brace         caber`
`abiders       braised       sidebar`
`ardeb         barde         debar`
`adsorbing     boardings     signboard`
`obtainer      reobtain      taborine`
`botanise      niobates      obeisant`
`ablest        bleats        stableablest        stable        tables`
`claimer       miracle       reclaim`
`ceramist      matrices      scimetarceramist      mistrace      scimetar`
`cristae       raciest       stearic`
`restack       stacker       tackers`
`clasper       parcels       reclasp`
`canter        recant        trance`
`ascent        centas        stance`
`cares         escar         scare`
`caret         recta         tracecater         recta         trace`
`aspic         picas         spica`
`ashed         deash         sadheashed         heads         sadhe`
`aisled        deasil        idealsdeasil        ideals        sailed`
`aired         irade         redia`
`aridest       disrate       staider`
`armed         derma         madre`
`derat         rated         trade`
`dates         stead         tsade`
`estrange      grantees      sergeant`
`elaters       reslate       stealer`
`afters        faster        strafe`
`aligner       engrail       realign`
`gnarliest     reslating     triangles`
`alerting      integral      triangle`
`atingle       elating       gelatinatingle       elating       genital`
`erasing       gainers       seringa`
`eatings       ingesta       seatingeatings       ingesta       teasing`
`hales         leash         sheal`
`horseman      menorahs      rhamnose`
`aliner        larine        renail`
`elastin       nailset       tenailselastin       salient       tenailsentails       nailset       slaintenailset       slainte       tenails`
`amines        inseam        semina`
`restrain      strainer      trainers`
`anestri       nastier       retinasanestri       retains       stainernastier       retinas       stearin`
`lomenta       omental       telamon`
`estral        slater        talersestral        staler        talers`
`lavers        slaver        versalravels        slaver        versal`
`ales          lase          seal`
`least         steal         talesleast         stela         tales`
`amen          mane          nema`
`restamp       stamper       tampers`
`marse         reams         smear`
`aspen         neaps         sneapaspen         peans         sneap`
`ante          etna          neat`
`esparto       proteas       seaport`
`aper          pare          reap`
`prayers       respray       sprayer`
`asper         parse         reapsasper         presa         reapsasper         presa         spareparse         reaps         spearprase         rapes         spearpresa         rapes         spare`
`aspers        passer        sparse`
`ares          rase          searares          rase          seraarse          ears          seareras          rase          sera`
`estray        stayer        yarest`
`resaw         sware         wares`
`aver          rave          vera`
`ates          east          seta`
`ate           eat           tea`
`asking        gaskin        kiangs`
`angst         stang         tangs`
`ankh          hank          khan`
`hosta         oaths         shoat`
`ash           has           sha`
`instar        strain        trains`
`ask           kas           ska`
`asp           pas           spa`
`cedi          dice          iced`
`corselet      electors      selector`
`citer         recti         trice`
`counter       recount       trounce`
`cuter         recut         truce`
`chi           hic           ich`
`kitsch        schtik        thicks`
`engirdle      lingered      reedling`
`dishonest     hedonists     stonished`
`deil          idle          lied`
`enduros       resound       sounder`
`eringo        ignore        region`
`ergo          goer          ogre`
`horste        others        reshot`
`eth           het           the`
`imposer       promise       semipro`
`emit          item          miteemit          item          time`
`estrin        insert        sinterestrin        insert        trinesestrin        sinter        triens`
`inert         niter         trine`
`neist         stein         tines`
`prise         ripes         speir`
`esprit        sprite        tripesesprit        stripe        tripesripest        sprite        tripesripest        stripe        tripes`
`rivets        stiver        verist`
`meno          nome          omen`
`presort       reports       sporter`
`poser         repos         spore`
`presto        respot        toperspresto        stoper        topers`
`estop         pesto         stope *estop         pesto         topes *estop         poets         stope estop         stope         topes *pesto         stope         topes *`
`overt         trove         voter`
`gunshot       hognuts       shotgun`
`ironings      nigrosin      rosining`
`opts          post          stop`

The last set is quite good, accomplishing derangements in only four letters:

`optspoststop`

but equally good are another couple of 4-letter derangements:

`emit  emititem  itemmite  time`

Unfortunately, mite and time are not derangements, so a 4-word set can't be formed with these words.

And even better, 3-letter sets:

`asp  eatpas  atespa  tea`

There are other 3-letter-word sets, but they have words more obscure than pas.

I've looked through the sets and found only one set of four words that are mutually deranged:

`estoppestostopetopes`

and marked the sets of three taken from them with * above on the main list.

 Posted by Charlie on 2007-12-05 16:30:43

 Search: Search body:
Forums (0)