On Feb 4, 2007, at 4:45 AM, Kalman Noel wrote:

> Ruby Quiz (James E. Gray):
>> This week's quiz is to write a program that accepts a list of  
>> words on STDIN and
>> outputs any one string equation using those words, assuming there  
>> is one.  Each
>> word in the list may be used zero or more times, but only on one  
>> side of the
>> equation.  The program should exit(0) on success and exit(1),  
>> without printing
>> any output, if a solution cannot be found.
>
> Shouldn't there be a requirement that an equations is invalid if  
> there is
> another, shorter equation that uses the same words? Otherwise:
>
> 	$ ruby quiz112.rb foo oof
> 	"foo"  =  "oof"
> 	"foo" + "foo"  =  "oof" + "oof"
> 	"foo" + "foo" + "foo"  =  "oof" + "oof" + "oof"
> 	...

If you want to make shorter equations a goal for your solution, go  
for it.  This is not a requirement of the quiz though.

James Edward Gray II