## 1. Introduction and main results

Let be an undirected graph, without loops or multiple edges. For a non-empty subset of vertices, we define the density as the fraction of the pairs of vertices of that span an edge of :

where is the set of all unordered pairs of vertices from . Hence for all subsets, if is an independent set and if is a clique.

We are interested in the following general problem: given a graph with vertices and an integer

, estimate the highest density of an

-subset . This is, of course, a hard problem: for example, testing whether a given graph contains a clique of a given size, or even estimating the size of the largest clique within a factor of for any , fixed in advance, is already an NP-hard problem [Ha99], [Zu99]. Moreover, modulo some plausible complexity assumptions, it is hard to approximate the highest density of an -subset for a given , within a constant factor, fixed in advance [Bh12]. The best known efficient approximation achieves the factor of in quasi-polynomial time [B+10]. There are indications that the factor might be hard to beat [B+12]. We note that the most interesting case is when grows and , since the highest density of an -subset can be computed in polynomial time up to an additive error of for any , fixed in advance [FK99] (and if is fixed in advance, the densest -subset can be found by the exhaustive search in polynomial time).### (1.1) Partition function

In this paper, we approach the problem of finding the densest, or just a reasonably dense subset, via computing the partition function

where is a parameter. The exponential tilting, , see for example, Section 13.7 of [Te99], puts greater emphasis on the sets of higher density. Let us consider the set of all -subsets of

as a probability space with the uniform measure. It is not hard to see that for any

, we have