On Oct 3, 2004, at 10:09 AM, Gavin Kistner wrote:

> Very nice, Robo. Whenever I've thought of "random except for ____" 
> type solutions, I've never gotten beyond thinking of "keep picking 
> random items until you meet the criteria" (which is a dumb way to go 
> about it).
>
> Filtering the pool is quite nice.

But does it work?  I chose the test data after much thought.  ;)

My second run (it may take multiple tries):

% ruby Robo.rb < quiz_data.txt
Luke Skywalker is watching over Toula Portokalos
Leia Skywalker is watching over Gus Portokalos
Toula Portokalos is watching over Luke Skywalker
Gus Portokalos is watching over Lindsey Brigman
Bruce Wayne is watching over Leia Skywalker
Virgil Brigman is watching over Bruce Wayne
Lindsey Brigman is watching over nobody

Note the last line.  Then examine the earlier lines to figure out why...

James Edward Gray II