In the mathematical field of extremal graph theory, homomorphism density with respect to a graph H {\displaystyle H} is a parameter t ( H , − ) {\displaystyle t(H,-)} that is associated to each graph G {\displaystyle G} in the following manner:
Above, hom ( H , G ) {\displaystyle \operatorname {hom} (H,G)} is the set of graph homomorphisms, or adjacency preserving maps, from H {\displaystyle H} to G {\displaystyle G} . Density can also be interpreted as the probability that a map from the vertices of H {\displaystyle H} to the vertices of G {\displaystyle G} chosen uniformly at random is a graph homomorphism. There is a connection between homomorphism densities and subgraph densities, which is elaborated on below.