Lowest common ancestor

id: lowest-common-ancestor-166-7748875
title: Lowest common ancestor
text: In graph theory and computer science, the lowest common ancestor (LCA) of two nodes v and w in a tree or directed acyclic graph (DAG) T is the lowest node that has both v and w as descendants, where we define each node to be a descendant of itself. The LCA of v and w in T is the shared ancestor of v and w that is located farthest from the root. Computation of lowest common ancestors may be useful, for instance, as part of a procedure for determining the distance between pairs of nodes in a tree:
brand slug: wiki
category slug: encyclopedia
description: Tree node with two other nodes as descendants
original url: https://en.wikipedia.org/wiki/Lowest_common_ancestor
date created: 2006-09-28T19:44:23Z
date modified: 2024-08-29T20:08:57Z
main entity: {"identifier":"Q4312352","url":"https://www.wikidata.org/entity/Q4312352"}
image:
fields total: 13
integrity: 15

Related Entries

Explore Next Part