For any two graphs F and G, let hom(F,G) denote the number of homomorphisms F → G, that is, adjacency preserving maps V (F ) → V (G) (graphs may have loops but no multiple edges). We characterize Institute of Mathematics, Eötvös Loránd University, Budapest, Hungary. Email: [email protected]. Research sponsored by OTKA Grant No. 67867. CWI and University of Amsterdam, Amsterdam, The Netherlands....