# Graph homomorphism

In the mathematical field of graph theory a graph homomorphism is a mapping between two graphs that respects their structure. More concretely it maps

• vertices to vertices
• undirected edges to undirected edges or collapses the edge onto a vertex.
• directed edges to directed edges (without changing direction) or collapses the edge onto a vertex
 Contents

## Definition

A graph homomorphism [itex]f[itex] from a graph [itex]G:=(V,E)[itex] to a graph [itex]G':=(V',E')[itex] is a function

[itex]f:V \cup E \to V' \cup E'[itex]

on the edges and vertices of [itex]G[itex] such that

1. vertices of [itex]G[itex] go to vertices of [itex]G'[itex],
2. if [itex]e[itex] is an edge of [itex]G[itex] with endpoints [itex]v[itex] and [itex]w[itex] then either [itex]f(e)[itex] is an edge of [itex]G'[itex] with endpoints [itex]f(v)[itex] and [itex]f(w)[itex], or [itex]f(e)=f(v)=f(w)[itex], and
3. if [itex]e[itex] is a directed edge of [itex]G[itex] from [itex]v[itex] to [itex]w[itex] then either [itex]f(e)[itex] is a directed edge of [itex]H[itex] from [itex]f(v)[itex] to [itex]f(w)[itex], or [itex]f(e)=f(v)=f(w)[itex].

The above definition works even when [itex]G[itex] and [itex]G'[itex] are allowed to have multiedges and loops. In the case of simple graphs, the definition can is slightly simpler: where an edge maps is determined by where its endpoints map.

Some authors use a stricter definition than the one given here, in which an edge is not allowed to map to a vertex. Thus, if the destination graph has no loops, adjacent vertices can't map to the same vertex.

If the homomorphism [itex]f[itex] is a bijection, then the inverse function is also a graph homomorphism, so [itex]f[itex] is a graph isomorphism. In this case, the two graphs are identical from the viewpoint of graph theory. Determining whether there is an isomorphism between two graphs is an important problem in computational complexity theory; see graph isomorphism problem.

## Examples

The function

[itex]f:G \to K_1[itex]

mapping a graph [itex]G[itex] to the complete graph with one vertex is a graph homomorphism.

## Notes

In terms of graph coloring, a k-coloring of G, without restrictions, is equivalent to a homomorphism of G into Kk, the complete graph on k vertices. (Each vertex of [itex]G[itex] is colored according to which vertex of [itex]K_k[itex] it goes to.) As an extension of that analogy, a homomorphism of G into H is also sometimes called an H-coloring.

## Properties

• Art and Cultures
• Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
• Space and Astronomy