NPR puzzle
Alex Tweedly
alex at tweedly.net
Wed Jul 20 19:40:57 EDT 2005
Charles Hartman wrote:
>
> On Jul 20, 2005, at 6:26 PM, Sarah Reichelt wrote:
>
>> You can either go through the word list and see if any match the
>> elements, or you could go through the element list, making
>> combinations and matching them to the words. I discarded this idea
>> because the maths involved in working out all the permutations &
>> combinations has long since flowed out of my brain, but I wonder if
>> anyone else thought of using this method? Instinctively I feel it
>> would take longer, but there are 3620 words and only 97 elements.
>
>
> If I remember right, that would be 97! / 5! x (97-5)!. And that -- if
> I'm *also* getting the arithmetic right -- would mean 64,446,024 ten-
> letter words to check. Looks like everyone's instinct to go the other
> way was sound.
>
No, they're not "combinations" - there's nothing to say you can't use
the same symbol more than once in a word (in fact, some of the words
do), so the number of words to check is simply 97 ^ 5 = 8,587,340,257
Yes, I did think of doing it that way. I also, just for the heck of it
thought of forming a monster regex
"[Al|Ar|.....|Zr][Al| ...Zr]..."
and seeing what that did - but neither of them seemed very likely, so I
didn't try them.
--
Alex Tweedly http://www.tweedly.net
--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.9.0/50 - Release Date: 16/07/2005
More information about the use-livecode
mailing list