Tree homomorphism

From Wikipedia, the free encyclopedia

In computer science, a tree homomorphism is a type of homomorphism defined on trees.

[edit] Definition

Given a pair of node-labeled trees T1 and T2, a mapping φ from the nodes of T1 to the nodes of T2 is a tree homomorphism if the following conditions hold:

  • φ maps the root of T1 to the root of T2,
  • if node n2 is a child of node n1 in T1, then φ(n2) is a child of φ(n1) in T2, and
  • for every node n \in T_1, the label of n in T1 is the same as the label of φ(n) in T2.

[edit] See also