Re: Permutations Problem



Honest John wrote:
I am trying to filter every combination of ten letters through a spell
checker, and so find valid english words. I have a problem in that ten
factorial, is over three point-six million words to filter, and
results in the computer crashing. (The computer is an old 2.66GHz P4
and just not up to the task).

Any suggestions how I can save computer resources?
[...]
my @words = grep $speller->check ( join '', @$_ ),
permutations(\@data);

Quite simple, actually. Your algorithm first generates the whole set of
permutations, then filters the desired results.
Instead just check each candidate as you create it. This way you avoid
having to store the whole 10 factorial elements.

jue


.



Relevant Pages

  • Re: Permutations Problem
    ... Honest John schrieb: ... checker, and so find valid english words. ... factorial, is over three point-six million words to filter, and ...
    (comp.lang.perl.misc)
  • Re: Permutations Problem
    ... I am trying to filter every combination of ten letters through a spell ... checker, and so find valid english words. ... rule-based but consult actual dictionaries for instance), ...
    (comp.lang.perl.misc)
  • Permutations Problem
    ... I am trying to filter every combination of ten letters through a spell ... checker, and so find valid english words. ...
    (comp.lang.perl.misc)
  • Re: Application for 2D filters with filter length >40 in image processing
    ... It has a marvelous tool in it called a "spell ... filters but it onli works for filter with larger filter lengthso i was wondring wat are the applications in such scenarios. ...
    (sci.image.processing)
  • Re: Was NUN: Bestellt, Bezahlt und nicht abgeholt ?
    ... Und schon hat man 95% alle Crackpots, Spammer, unflätiger Dummbeutel und sonstigen Personen ausgefiltert. ... Checker oder Filter zur unterscheidung von Realnamen zu Erfundenen ...
    (de.soc.recht.misc)