I have a task of comparing two organisation charts. These chart objects are described as a set of nodes (people) where each has a unique ID field and a parent ID field (pointing to another node's unique ID). For simplicity we can assume that there's only one node without a parent ID (head of the organisation) and that no node can reference itself. So it's essentially a tree of all the people in the organisation. Comparison should produce two lists - people who left the organisation, people who joined, and people who have changed their position in the organisation. Leavers and joiners are trivial, but I don't know how to proceed with people who changed their position. I need some ideas on how to proceed with identifying people who really moved within the chart from those who only have new parent IDs.
Comparing two graphs, finding vertices that changed their positions
graph theory;graphs