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

LanX,
And I'm stuck finding a formula which calculates all unique solutions

If a letter was allowed to repeat up to the maximum 8 times, the formula is:

(n + (k - 1))! -------------- k! (n - 1)! 33! -------- = 13_884_156 8! * 25!

I am not sure how to get from 13_884_156 to 12_461_993 strictly through calculation but it seems like it should be possible.

Cheers - L~R

Replies are listed 'Best First'.
Re^8: Challenge: 8 Letters, Most Words
by LanX (Saint) on Oct 07, 2013 at 18:08 UTC
    Hei L~R,

    I'm sure there is a formula, but I doubt it's a simple formula. (rather something with 26 subterms)

    I could dig into it for some time, but firing our script which just counts all combinations seems fine for me! :)

    So you are still obsessed with this problem? :)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      LanX,
      So you are still obsessed with this problem? :)

      I believe that if a formula exists, it would be <total> - <calculate for a> - <calculate for b> ... <calculate for z>.

      I am not really obsessed with the problem. I just like to learn and this was a fun distraction. Most of the heuristic solutions in this thread are ones I had considered and abandoned because I could think of a trivial case where it failed. It is also why I resorted to an exhaustive search. Not because a heuristic solution wouldn't be good enough or that it may be guaranteed to give the correct solution on any real dictionary but because I wanted to see if I could do it in a reasonable (less than 24 hours) amount of time. I was completely shocked that it only took 12 minutes on my home machine.

      Cheers - L~R

        Please trust me!

        I did my master thesis on combinatorial aspects of lattices, and these structures are much more general, they are only posets.

        Not many trivial explicit formulas in this fields, at most upper and lower bounds.

        I'm pretty sure the approach I showed would solve the 8 letter problem under 12 min in Perl ... even faster with more memoizing tricks.

        Cheers Rolf

        ( addicted to the Perl Programming Language)