In the routine I’ve attached, my starting point is a tree where some branches share identical elements. My target is to obtain a tree where each branch contains the elements that are common across its sub-branches (see attached image). To achieve this, I created an ID for each branch (x_y), but I’m struggling to get the sorting right. Can anyone help me with this?
I would have done it almost like you did, except for some flatten/graft difference at the end (replace path component is for trees, but the path lists in SEARCH and REPLACE inputs are usually lists, not trees)
Also, your path number for A_B is {0;0;1} and {0;0;2} which is incorrect as counting starts from 0. It should be {0;0;0} and {0;0;1} unless you have a specific reason for use the former method
Thank you very much for your response. It works perfectly for this case. I don’t usually use the Explode Tree component because it requires manually entering the number of branches.