 In both, the edges of the DAG are assumed to point from parents to children.In a tree, the lowest common ancestor is unique; in a DAG of nodes, each pair of nodes may have as much as LCAs , while the existence of an LCA for a pair of nodes is not even guaranteed in arbitrary connected DAGs.A brute-force algorithm for finding lowest common ancestors is given by