[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Weekend Edition Sunday Puzzle (from c.l.p.mod)



On Fri, Jul 16, 1999 at 04:27:11PM -0400, Michael G Schwern wrote:
> On Fri, Jul 16, 1999 at 12:24:05PM -0700, Vicki Brown wrote:
> > Here's the puzzle:
> > 
> >    Take the 9-letter-word SUBDEACON (the name of a church official).
> >    The word contains the first 5 letters of the alphabet, ABCD and E
> >    consecutively inside it, although not in alphabetical order. This
> >    is a two-part challenge: 
> >
> >    first, can you think of a common 8-letter
> >    word that has ABCDE consecutively inside it, not necessarily in
> >    alphabetical order; 
> >    second, can you think of a common 7-letter word
> >    with the same property? Both answers are uncapitalized words that
> >    are familiar to everyone.
> 
> <snicker-snatch>
> 
> Run /usr/dict/words through that and it should give you answers.  I
> found the answer to the 7 letter one (I'm not going to give it away
> :P) but no 8 letter.

Had a subtle bug in my program, now it finds the 8 letter.

http://www.pobox.com/~schwern/src/common-letters has the fixed code.
It didn't properly redo the search after finding two target letters in
a row (like 'ee'). 

I found 3 seven letter words and 1 eight letter word
matching using a very large word file.  The matching 8 letter word is
very common, the 7 letter ones are uncommon, but not terribly so.


-- 

Michael G Schwern                                           schwern@pobox.com
                    http://www.pobox.com/~schwern
     /(?:(?:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe