http://www.perlmonks.org?node_id=1056963


in reply to Re^4: Challenge: 8 Letters, Most Words
in thread Challenge: 8 Letters, Most Words

> That leaves 13_884_156 possible 8 letter combinations. Since I am using a specific dictionary and no word allows a single letter to repeat more than 5 times,

I think pre-investigating the dictionary should dramatically limit this number.

Just find the real maximum repetition for each letter.

Cheers Rolf

( addicted to the Perl Programming Language)

Replies are listed 'Best First'.
Re^6: Challenge: 8 Letters, Most Words
by Limbic~Region (Chancellor) on Oct 05, 2013 at 02:38 UTC
    LanX,
    I did that but it didn't reduce it dramatically. As I pointed out elsewhere, that only gets it down to 12_461_993.

    Cheers - L~R

      Yeah I agree about 12_461_993

      Anyway you don't need to check against all words in the dictionary, only taking the (at most) 256 subsets of a potential 8 letter combination. (less if letters are repeated)

      This can be done in a lookup in a prepared count-hash with normalized keys.

      Cheers Rolf

      ( addicted to the Perl Programming Language)