| Author |
Comment/Response |
Gabby
|
05/20/10 10:51pm
Hello, I need to find a way to graph and distinguish two linked lists that intersect, that is, they share a common node. The problem is, graphically once the lists intersect I can't tell which list is which. For example, suppose I have two lists:
list1 = {1 -> 2, 2 -> 3, 3 -> 9};
list2 = {5 -> 2, 2 -> 6};
Notice both lists have "2" in common, but list1 then links to 3 while list2 links to 6. If I combine both lists into a single list, list3:
list3 = {1 -> 2, 2 -> 3, 3 -> 9, 5 -> 2, 2 -> 6};
And then:
LayeredGraphPlot[list3, Left, VertexLabeling -> True]
I get a plot, but I can't tell list1 from list2 once they both intersect at node 2. So is there a way to graphically distinguish between list1 and list2?
Thanks!
URL: , |
|