Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #30062 > unrolled thread

Forming tree from parent set

Started byNeel Salpe <itnilesh@gmail.com>
First post2014-10-06 03:01 -0700
Last post2014-10-10 16:32 +0200
Articles 3 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Forming tree from parent set Neel Salpe <itnilesh@gmail.com> - 2014-10-06 03:01 -0700
    Re: Forming tree from parent set Eric Sosman <esosman@comcast-dot-net.invalid> - 2014-10-06 08:02 -0400
    Re: Forming tree from parent set Brixomatic <brixomatic@yahoo.com> - 2014-10-10 16:32 +0200

#30062 — Forming tree from parent set

FromNeel Salpe <itnilesh@gmail.com>
Date2014-10-06 03:01 -0700
SubjectForming tree from parent set
Message-ID<77607811-7abb-4981-8f40-b46f6757d3d7@googlegroups.com>
Form Tree from following data 

I have data like this 

6 has parent SET 5,4 

5 has parent SET 3,4,1,2 

4 has parent SET 2,1,4 

3 has parent SET 2,1 

I need to create tree like 

1 --> 2 --> 3 --> 4 --> 5 --> 6 

OR 

2--> 1--> 3--> 4-- >5 --> 6 

Because there is no enough info about 1-->2 or 2--> 1



Here in practice I need to distribute problem and compute across node .
There will be millions of such sets .

[toc] | [next] | [standalone]


#30063

FromEric Sosman <esosman@comcast-dot-net.invalid>
Date2014-10-06 08:02 -0400
Message-ID<m0u0bu$e9$1@dont-email.me>
In reply to#30062
On 10/6/2014 6:01 AM, Neel Salpe wrote:
> Form Tree from following data
>
> I have data like this
>
> 6 has parent SET 5,4
>
> 5 has parent SET 3,4,1,2
>
> 4 has parent SET 2,1,4
>
> 3 has parent SET 2,1
>
> I need to create tree like
>
> 1 --> 2 --> 3 --> 4 --> 5 --> 6
>
> OR
>
> 2--> 1--> 3--> 4-- >5 --> 6
>
> Because there is no enough info about 1-->2 or 2--> 1

     If it weren't for the circularity (4 being its own parent),
I'd say what you're looking for is "Topological Sorting."  That's
what to search for if 4's confused parentage is a typo; if it's
not, please explain more clearly what you're trying to do.

-- 
esosman@comcast-dot-net.invalid

[toc] | [prev] | [next] | [standalone]


#30067

FromBrixomatic <brixomatic@yahoo.com>
Date2014-10-10 16:32 +0200
Message-ID<MPG.2ea20c6bbda81d5c98968d@news.aioe.org>
In reply to#30062
In article <77607811-7abb-4981-8f40-b46f6757d3d7@googlegroups.com>, Neel 
Salpe (itnilesh@gmail.com) says...

> Here in practice I need to distribute problem and compute across node .
> There will be millions of such sets .

Interesting, but what's your question?

Kind regards,


-- 
..Alesi's problem was that the back of the car was jumping up and down 
dangerously - and I can assure you from having been teammate to 
Jean Alesi and knowing what kind of cars that he can pull up with, 
when Jean Alesi says that a car is dangerous - it is. [Jonathan Palmer]

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web