I am looking for a perl program that will solve the following problem.
Suppose I have 2 or more lists that are (conceptually) sublists of the
same underlying list.
I want to reconstruct the underlying list.  In other words the order of
the elements agrees in all the lists, but there is no sort condition.

Example:
List 1: dog, cat, mouse
List 2: dog, shark, mouse, elephant

There are 2 possible outputs, and I do not care which one I get.

The reason that I have not just coded this up is that it seems it
require an unbounded amount of look ahead.  Also, when there are more
than 2 lists, I think I need to read from all of them before making a
decision about which element can be safely output.

Thanks,
Steve
-- 
Steven Tolkin    [EMAIL PROTECTED]     508-787-9006
Fidelity Investments   400 Puritan Way M3B     Marlborough MA 01752
There is nothing so practical as a good theory.  Comments are by me, 
not Fidelity Investments, its subsidiaries or affiliates.
 
_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to