Tree homomorphism

From HandWiki

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

Definition

Given a pair of rooted 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 nT1, the label of n in T1 is the same as the label of ϕ(n) in T2.

See also