Date: 08/15/00
- Next message: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Previous message: Joao Prado Maia: "Re: [PHP] odd addition error<>?"
- In reply to: Bill Zeller: "[PHP] for all you recursion experts--i'm stuck! help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If it were prolog things could be much easier, cause it was
almost specifically created for that kind of tasks...
Anybody knows if prolog extensions are available for PHP?
~Peter
----- Original Message -----
From: Bill Zeller <billzeller <email protected>>
To: <php-general <email protected>>
Sent: 15 августа 2000 г. 22:26
Subject: [PHP] for all you recursion experts--i'm stuck! help!
> Hey,
>
> I've been trying to figure out how to loop through a
> "box" of letters. For example, if I had something like
> this:
>
> a d b a e t b
> q a w e g a w
> w b p w a e d
> p a w e d g p
> d a w w e b a
>
> It should start at a and loop through every possible
> combination until it finds out that it can't be a
> word. So in the above example, it should think like
> this:
>
> 1. There are words that begin with a, continue...
> 2. 'ad' is a word, add it to array $words[]...
> 3. There are words that begin with 'ad', continue...
> 4. 'adq' is not a word, do not add it to array
> $words...
> 5. There are no words that begin with 'adq', go back
> to last word (in this case it is 'ad')
>
> It would then go onto adb, adba, etc. It should loop
> through every possible combination the entire puzzle,
> checking each letter with every other letter close to
> it.
>
> Any ideas on where to start?
>
> Best Regards,
> Bill Zeller
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe <email protected>
> For additional commands, e-mail: php-general-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Sam Masiello: "RE: [PHP] odd addition error<>?"
- Previous message: Joao Prado Maia: "Re: [PHP] odd addition error<>?"
- In reply to: Bill Zeller: "[PHP] for all you recursion experts--i'm stuck! help!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

