Solved
Algorithm - preventing the roots of a tree from joining up with one another
Posted on 1998-10-12
Hello, here's my question :
a. I have an algorithm that grows a tree(can either be free or rooted).
v4
/ \
/ \
/ \
/ \
/ \
v2 v6
/ \ / | \
/ \ / | \
v1 v3 v5 v7 v8
| |
| |
v10 v9
....and so on
The trouble with my algorithm is that the roots of the tree will join to one another as long as a certain criteria is satisfied.
For example, if a criteria(eg. shortest distance) is satisfied between v10 and v3, then a line will be drawn joining v10 and v3. When that happens, I don't have a proper tree structure anymore. Sad !
Similarly if v10 joins v5 or v10 joins v8 or v2 joins v6, I don't get a tree.
b. I hope that someone out there can enlighten me with some algorithm that allows me to test if an illegal line is about to be drawn.
IF illegal line to be drawn then return a false value.
c. I be glad to provide more details.
Thanks a lot.