  We study an inhomogeneous sparse random graph on [N] = {1, . . . , N } as
introduced in a seminal paper by Bollobas, Janson and Riordan (2007): vertices
have a type (here in a compact metric space S), and edges between different
vertices occur randomly and independently over all vertex pairs, with a
probability depending on the two vertex types. In the limit N to infinity, we
consider the sparse regime, where the average degree is O(1). We prove a
large-deviations principle with explicit rate function for the statistics of
the collection of all the connected components, registered according to their
vertex type sets, and distinguished according to being microscopic (of finite
size) or macroscopic (of size proportional to N). In doing so, we derive
explicit logarithmic asymptotics for the probability that GN is connected. We
present a full analysis of the rate function including its minimizers. From
this analysis we deduce a number of limit laws, conditional and unconditional,
which provide comprehensive information about all the microscopic and
macroscopic components of the graph. In particular, we recover the criterion
for the existence of the phase transition given in [5].
