Re: Anagram Solution in PHP

From: Date: Mon, 10 Sep 2001 13:41:36 +0000
Subject: Re: Anagram Solution in PHP
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66731@lists.php.net to get a copy of this message
I have no idea how anagrams work, but is it true as you say/imply: "If the same of the characters of a string is same as the sum of other characters in another string THEN the last is an anagram of the first?" "Ralph Guzman" <raguzman@netraiser.com> wrote in message news:DGEILLMLDFCLCLGOEKMIMEELDEAA.raguzman@netraiser.com... > Im trying to figue out the following anagram using PHP. Here is the problem: > > Using letters of the alphabet represented by a number, I have to come up > with words that add up to exactly 100. > > Numbers are in reverse where A=26 and Z=1, so for example: > > A B C...X Y Z > 26 25 24..3 2 1 > > So let's say the word 'acronym' > > A + C + R + 0 + N + Y + M > 26 + 24 + 9 + 12 + 13 + 2 + 14 = 100 > > My thoughts were to download a list of words in the dictionary, then read > the file and somehow replace each letter by its number, then add each letter > for each word and see which words would equal to 100. > > So I am emailing this list for any suggestions or examples of code that I > can use to accomplish this. Any help? > > Thanks much. > > >

« previous php.general (#66731) next »