title: Core (graph theory)
text: # Core (graph theory)
  
  In the mathematical field of graph theory, a core is a notion that describes behavior of a graph with respect to graph homomorphisms.
  
  ## Definition
  
  Graph $C$ is a core if every homomorphism $f:C\to C$ is an isomorphism, that is it is a bijection of vertices of $C$.
  
  A core of a graph $G$ is a graph $C$ such that
  
  * There exists a homomorphism from $G$ to $C$,
  * there exists a homomorphism from $C$ to $G$, and
  * $C$ is minimal with this property.
  
  Two graphs are said to be homomorphism equivalent or hom-equivalent if they have isomorphic cores.
  
  ## Examples
  
  * Any complete graph is a core.
  * A cycle of odd length is a core.
  * A graph $G$ is a core if and only if the core of $G$ is equal to $G$.
  * Every two cycles of even length, and more generally every two bipartite graphs are hom-equivalent. The core of each of these graphs is the two-vertex complete graph $K_2.$
  * By the Beckman–Quarles theorem, the infinite unit distance graph on all points of the Euclidean plane or of any higher-dimensional Euclidean space is a core.
  
  ## Properties
  
  Every finite graph has a core, which is determined uniquely, up to isomorphism. The core of a graph G is always an induced subgraph of G. If $G\to H$ and $H\to G$ then the graphs $G$ and $H$ are necessarily homomorphically equivalent.
  
  ## Computational complexity
  
  It is NP-complete to test whether a graph has a homomorphism to a proper subgraph, and co-NP-complete to test whether a graph is its own core (i.e. whether no such homomorphism exists) (Hell & Nešetřil 1992).
  
  