Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-30 Thread Uri Guttman
> "TS" == Tolkin, Steve <[EMAIL PROTECTED]> writes: TS> As another aside, if people are interested I can send 77 lines of data TS> for each of these 2008 model year cars: Camry, Accord, Infiniti_G35, TS> Impreza, Altima, Audi_A4, Volvo_S40, Saab_9_3 TS> I would not mind off-list

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-30 Thread Tolkin, Steve
I am replying to myself to thank all the Perl mongers who replied with help. Indeed, my problem is topological sort, as stated by Alex Vandiver and Gyepi SAM. I did not see that because the input format is different from that required by the Unix tsort program. A search for: tsort "perl power

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-30 Thread Ted Zlatanov
On Tue, 29 Jan 2008 16:27:16 -0500 (EST) Chris Devers <[EMAIL PROTECTED]> wrote: CD> On Tue, 29 Jan 2008, Tolkin, Steve wrote: >> 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. ... CD> Out of

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread Jean-Baptiste Nivoit
http://search.cpan.org/~vparseval/List-MoreUtils-0.22/lib/List/MoreUtils.pm has primitives that look a little like what you're looking for, but quite exactly the same. Maybe you could adapt one of those utilities? On Jan 29, 2008 12:11 PM, Tolkin, Steve <[EMAIL PROTECTED]> wrote: > I am looking

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread Chris Devers
On Tue, 29 Jan 2008, Tolkin, Steve wrote: > 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

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread Gyepi SAM
On Tue, Jan 29, 2008 at 12:11:56PM -0500, Tolkin, Steve wrote: > 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

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread Bernardo Rechea
On Tuesday 29 January 2008 12:11, Tolkin, Steve wrote: > 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

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread Alex Vandiver
On Tue, 2008-01-29 at 12:04 -0800, Ben Tilly wrote: > [snip] > That is logically unavoidable. Yup, and in fact provably true. The problem is the same as finding a topological ordering among a directed acyclic graph. Wikipedia can inform you more on the topic (

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread Ben Tilly
On Jan 29, 2008 10:57 AM, David Golden <[EMAIL PROTECTED]> wrote: > On Jan 29, 2008 12:11 PM, Tolkin, Steve <[EMAIL PROTECTED]> wrote: > > 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. > > > >

Re: [Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread David Golden
On Jan 29, 2008 12:11 PM, Tolkin, Steve <[EMAIL PROTECTED]> wrote: > 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 > >

[Boston.pm] merging lists that are ordered but not sorted

2008-01-29 Thread Tolkin, Steve
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