pairs to tree

G

George Mpouras

I am re-thinking an old graph problem . Any idea of how to build e.g. the
tree

a
b
e
f
c
d
t
t
a
f
a

from the pairs ?

f,a
t,a
d,t
b,e
b,f
a,c
a,d
a,b
 
T

Tim McDaniel

I am re-thinking an old graph problem . Any idea of how to build
e.g. the tree

a
b
e
f
c
d
t
t
a
f
a

from the pairs ?

f,a
t,a
d,t
b,e
b,f
a,c
a,d
a,b

I'm curious: for what class is this a homework problem?

Also, I don't see the specification. The pairs are
parent,child
and it even appears to be bottom-up.

But sometimes it's shown as transitive, like how
b,e
a,b
resulted in
a
b
e

But
t,a
d,t
does not result in
d
t
a
but instead
t
a
is itself a side tree.
 
G

George Mpouras

order is not important. pairs are unique. it is about building topology maps.
 
T

Tim McDaniel

I'm curious: for what class is this a homework problem?

Also, I don't see the specification. The pairs are
parent,child
and it even appears to be bottom-up.

But sometimes it's shown as transitive, like how
b,e
a,b
resulted in
a
b
e

But
t,a
d,t
does not result in
d
t
a
but instead
t
a
is itself a side tree.

Reply:
order is not important. pairs are unique. it is about building
topology maps.

I'm usually fond of trimming unneeded text, but for someone on a
newsgroup, trimming ALL context and background is not so good.

I'm sorry, but you did not answer my questions. Expanding a bit:

But sometimes it's shown as transitive, like how
b,e
a,b
results in
a
b
e

But
t,a
d,t
a,d
does not result in
a
d
t
a
but instead
a
d
and
t
a
in two separate trees. Why? How is the program supposed to know what
to do?
 
M

Marc Girod

order is not important. pairs are unique. it is about building topology maps.

I have the same problem as Tim to understand your question.
There are even cycles...

t -> a -> d -> t
f -> a -> b -> f

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top