I confess that I took the same approach -

    q:1e6
2 2 2 2 2 2 5 5 5 5 5 5

and then spent some time trying to think of a simple algorithm to get 
the valid factors, finally simply doing them in my head to get b d e 
h j p t y (with the same omission of a ....)

But most of my time/frustration was spent on not finding any $1e6 
word in various word lists that I have - so finally resorting to 
downloading the one Roger kindly pointed to. Then, in putting the 
steps into one line, I realized that it was neater, and probably just 
about the same speed as selecting the "valid" words, to simply 
calculate the product for all words.

It had the added benefit of unwittingly correcting my failure to include a ...

I do hope to hear some feedback on the j bug that causes an infinite 
loop after the second execution of my expression in PPC OSX -- anyone 
else able to observe that??

- joey

At 10:52  +0100 2010/06/16, Mike Day wrote:
>Whoops!
>
>Sherlock, Ric wrote:
>>  1 (and therefore 'a') is also a factor of 1 million and may 
>>provide other valid words?
>>
>>  
>>>  From: Mike Day
>>>  Sent: Wednesday, 16 June 2010 20:15
>>>
>>>  Joey's solution is so very quick and satisfying that this is hardly
>>>  worth remarking,  but I will anyway!
>>>
>>>  A 1 million-dollar word may only contain letters whose values are
>>>  factors of 1 million, namely
>>>    2 4 5 8 10 16 20 & 25
>>>  so words containing letters other than
>>>     b d e h j p t y
>>>  may be excluded immediately.
>>>
>>>  My wordlist with ~ 173000 words has only 112 "valid" words,
>>>  including "typey".
>>>
>>>  M
>>>
>>>  Joey K Tuttle wrote:
>>>    
>>>>  I don't consider j to be a typey language... Pretty specialized
>>>>      
>>>  lexicon!
>>>    
>>>>      words {~ I. 1e6 = ; */ &.> ' abcdefghijklmnopqrstuvwxyz'&i.&.>
>>>>  words =. <;._2 ] 1!:1<'itawords.txt'
>>>>  +-----+
>>>>  |typey|
>>>>  +-----+
>>>>
>>>>
>>>>  At 21:33  -0700 2010/06/15, Roger Hui wrote:
>>>>
>>>>      
>>>>>   >From the Journal of Recreational Mathematics,
>>>>>  Volume 27, Number 2, 1995.
>>>>>
>>>>>  Map a to $1, b to $2, ... z to $26.  The value of
>>>>>  a word is the product of the values of its letters.
>>>>>  Find a million dollar word.
>>>>>
>>>>>  If you need a lexicon, there is one available at
>>>>>
>>>>>        
>>>  http://www.jsoftware.com/jwiki/Puzzles/Palindromic%20Pangram?action=Att
>>>  achFile&do=get&target=itawords.txt
>>>    
>>>>>  --------------------------------------------------------------------
>>>>>        
>>>  --
>>>    
>>>>>  For information about J forums see
>>>>>        
>>>  http://www.jsoftware.com/forums.htm
>>>    
>>>>  ---------------------------------------------------------------------
>>>>      
>>>  -
>>>    
>>>>  For information about J forums see
>>>>      
>>>  http://www.jsoftware.com/forums.htm
>>>    
>>>>      
>>>  ----------------------------------------------------------------------
>>>  For information about J forums see http://www.jsoftware.com/forums.htm
>>>    
>>  ----------------------------------------------------------------------
>>  For information about J forums see http://www.jsoftware.com/forums.htm
>>
>>  
>
>----------------------------------------------------------------------
>For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to