Large cliques in sparse random intersection graphs

Given positive integers n and m, and a probability measure P on {0, 1, ..., m} the random intersection graph G(n,m,P) on vertex set V = {1,2, ..., n} and with attribute set W = {w_1, w_2, ..., w_m} is defined as follows. Let S_1, S_2, ..., S_n be independent random subsets of W such that for any v \in V and any S \subseteq W we have \pr(S_v = S) = P(|S|) / \binom (m, |S|). The edge set of G(n,m,P) consists of those pairs {u,v} V for which S_u and S_v intersect. We study the asymptotic order of the clique number \omega(G(n,m,P)) in random intersection graphs with bounded expected degrees. For instance, in the case m = \Theta(n) we show that if the vertex degree distribution is power-law with exponent \alpha \in (1;2), then the maximum clique is of a polynomial size, while if the variance of the degrees is bounded, then the maximum clique has (ln n)/(ln ln n) (1 + o_P(1)) vertices whp. In each case there is a polynomial algorithm which finds a clique of size \omega(G(n,m,P)) (1-o_P(1)).


Introduction
Bianconi and Marsili observed in 2006 [4] that "scale-free" real networks can have very large cliques; they gave an argument suggesting that the rate of divergence is polynomial if the degree variance is unbounded [4]. In a more precise analysis, Janson, Luczak and Norros [12] showed exact asymptotics for the clique number in a power-law random graph model where edge probabilities are proportional to the product of weights of their endpoints.
Another feature of a real network that may affect formation of cliques is the clustering property: the probability of a link between two randomly chosen vertices increases dramatically after we learn about the presence of their common neighbour. An interesting question is whether and how the clustering property is related to the clique number.
With conditionally independent edges, the random graph of [12] does not have the clustering property and, therefore, can not explain such a relation.
In the present paper we address this question by showing precise asymptotics for the clique number of a related random intersection graph model that admits a tunable clustering coefficient and power-law degree distribution. We find that the effect of clustering on the clique number only shows up for the degree sequences having a finite variance. We note that the finite variance is a necessary, but not sufficient condition for the clustering coefficient to attain a non-trivial value, see [6] and (5) below.
In the language of hypergraphs, we ask what is the largest intersecting family in a random hypergraph on the vertex set [m], where n identically distributed and independent hyperedges have random sizes distributed according to P . A related problem for uniform hypergraphs was considered by Balogh, Bohman and Mubayi [2]. Although the motivation and the approach of [2] are different from ours, the result of [2] yields the clique number, for a particular class of random intersectipon graphs based on the subsets having the same (deterministic) number of elements.
The random intersection graph model was introduced by Karoński, Scheinerman and Singer-Cohen in 1999 [14] and further generalised by Godehardt and Jaworski [11] and others. With appropriate parameters, it yields graphs that are sparse [9,7], have a positive clustering coefficient [9,6] and assortativity [5]. We will consider a sequence {G(n)} = {G(n), n = 1, 2, . . . } of random intersection graphs G(n) = G(n, m, P ), where P = P (n) and m = m(n) → +∞ as n → +∞. Let X(n) denote a random variable distributed according to P (n) and define Y (n) := n m X(n). If not explicitly stated otherwise, the limits below will be taken as n → ∞. In this paper we use the standard notation o(), O(), Ω(), Θ(), o P (), O P (), see, for example, [13]. For positive sequences (a n ), (b n ) we write a n ∼ b n if a n /b n → 1 a n ≪ b n if a n /b n → 0. For a sequence of events {A n }, we say that A n occurs whp, if P(A n ) → 1.
We will assume in what follows that This condition ensures that the expected number of edges in G(n) is O(n). Hence G(n) is sparse. We remark, that if, in addition, Y (n) converges in distribution to an integrable random variable, say Z, and E Y (n) → E Z, then G(n) has asymptotic degree distribution P oiss(λ), where λ = ZE Z, see, e.g., [6]. In particular, if Y (n) has asymptotic square integrable distribution, then G(n) has asymptotic square integrable degree distribution too. Furthermore, if Y (n) has a power-law asymptotic distribution, then G(n) has asymptotic power-law degree distribution with the same exponent.
Our first result, Theorem 1.1, shows that in the latter case the clique number diverges polynomially. In fact, we do not require Y (n) to have a limiting power-law distribution, but consider a condition that only involves the tail of Y (n). Namely, we assume that for some α > 0 and some slowly varying function L there is 0 < ǫ 0 < 0.5 such that for each sequence x n with n 1/2−ǫ0 ≤ x n ≤ n 1/2+ǫ0 we have We recall that a function L : R + → R + is called slowly varying if lim x→∞ L(tx)/L(x) = 1 for any t > 0.
We remark that adjacency relations of neighbouring vertices of a random intersection graph are statistically dependent events and this dependence is not negligible for m = O(n). Theorem 1.1 says that in the case where the asymptotic degree distribution has infinite second moment (α < 2), the asymptotic order (3) of a power-law random intersection graph is the same as that of the related model of [12] which has conditionally independent edges. Let us mention that the lower bound for the clique number ω(G(n)) is obtained using a simple and elegant argument of [12], which is not sensitive to the statistical dependence of edges of G(n).
To show the matching upper bound we developed another approach based on a result of Alon, Jiang, Miller and Pritkin [1] in Ramsey theory.
In the case where the (asymptotic) degree distribution has a finite second moment we not only find the asymptotic order of ω(G(n)), but also describe the structure of a maximal clique. To this aim, it is convenient to interpret attributes w ∈ W as colours. The set of vertices T (w) = {v ∈ V : w ∈ S v } induces a clique in G(n) which we denote (with some ambiguity of notation) T (w). We say that every edge of T (w) receives colour w and call this clique monochromatic. Note that G(n) is covered by the union of monochromatic cliques T (w), w ∈ W . We denote the size of the largest monochromatic clique by ω ′ (G(n)). Clearly, ω(G(n)) ≥ ω ′ (G(n)).
Denote x ∨ y = max(x, y). The next theorem shows that the largest clique is a monochromatic clique (plus possibly a few extra vertices). Theorem 1.2 Assume that {G(n)} is a sequence of random intersection graphs satisfying (1). Suppose that V ar(Y (n)) = O(1). Then If, in addition, for some positive sequence {ǫ n } converging to zero we have then, for an absolute constant C, The condition (4) is not very restrictive. It is satisfied by uniformly square integrable sequences {Y (n)}. In particular, (4) holds if {Y (n)} converges in distribution to a square integrable random variable, say Y * , and E Y 2 (n) converges to E Y 2 * . Next, we evaluate the size of the largest monochromatic clique. For this purpose we relate the random intersection graph to the balls into bins model. Let every vertex v ∈ V throw X v := |S v | balls into the bins w 1 , . . . , w m uniformly at random, subject to the condition that every bin receives at most one ball from each vertex. Then ω ′ (G(n)) counts the maximum number of balls contained in a bin. Let M (N, m) denote the maximum number of balls contained in any of m bins after N balls were thrown into m bins uniformly and independently at random. Our next result says that the probability distribution of ω ′ (G(n)) can be approximated by that of M (N, m), with N ≈ nE X(n) = E (X 1 + · · · + X n ). The asymptotics of M (N, m) are well known, see, e.g., Section 6 of Kolchin et al [15].
Denote by d T V (ξ, η) = 2 −1 i≥0 |P(ξ = i) − P(η = i)| the total variation distance between probability distributions of non-negative integer valued random variables ξ and η. Theorem 1.3 Assume that {G(n)} is a sequence of random intersection graphs satisfying E Y = Θ(1) and V ar(Y ) = O(1). Then Let us summarize our results about the clique number of a sparse random intersection graph G(n) with a square integrable (asymptotic) degree distribution. We note that the conditional probability (called the clustering coefficient of G(n)) only attains a non-trivial value for m = Θ(n) and E Y 2 (n) = Θ(1). (Here u ∼ v is the event that u and v are adjacent in G(n), i.e., uv ∈ E(G(n)).) In the latter case Theorems 1.2 and 1.3 together with the asymptotics for M (N, m) (Theorem II.6.1 of [15]), imply that ω(G(n)) = ln n ln ln n (1 + o P (1)) .
In contrast, the clique number of a sparse Erdős-Rényi random graph G(n, c/n) is at most 3, and in the model of [12], with square integrable asymptotic degree distribution, the largest clique has at most 4 vertices. Each of our main results, Theorem 1.1 and Theorem 1.2, have corresponding simple polynomial algorithms that construct a clique of the optimal order whp. For a power-law graph with α ∈ (1; 2), it is the greedy algorithm of [12]: sort vertices in descending order according to their degree; traverse vertices in that order and 'grow' a clique, by adding a vertex if it is connected to each vertex in the current clique. For a graph with a finite degree variance we propose even simpler algorithm: for each pair of adjacent vertices, take any maximal clique formed by that pair and their common neighbours. Output the biggest maximal clique found in this way. More details and analysis of each of the algorithms are given in Section 4 below.
In practical situations a graph may be assumed to be distributed as a random intersection graph, but information about the subset size distribution may not be available. In such a case, instead of condition (2) for the tail of the normalised subset size Y (n), we may consider a similar condition for the tail of the degree D 1 (n) of the vertex 1 ∈ V in G(n): there are constants α ′ > 1, ǫ ′ > 0 and a slowly varying function L ′ (x) such that for any sequence t n with The following lemma shows that, subject to an additional assumption, there is equivalence between conditions (2) and (6) .
Lemma 1.5 Assume that {G(n)} is a sequence of random intersection graphs such that for some ǫ > 0 we have Suppose that either (E Y (n)) 2 or E D 1 (n) converges to a positive number, say, d.
Thus, under a mild additional assumption (7), condition (2) of Theorem 1.1 can be replaced by (6). Similarly, the condition V arY (n) = O(1) of Theorem 1.2 can be replaced by the condition V arD 1 (n) = O(1). Lemma 1.6 Assume that {G(n)} is a sequence of random intersection graphs and for some positive sequence {ǫ n } converging to zero we have Cliques of random intersection graphs have been studied in [14], where edge density thresholds for emergence of small (constant-sized) cliques were determined, and in [18], where the Poisson approximation to the distribution of the number of small cliques was established. The clique number was studied in [17], see also [3], in the case, where m ≈ n β , for some 0 < β < 1. We note that in the papers [14], [18], [17] a particular random intersection graph with the binomial distribution P ∼ Bin(p, m) was considered.
The rest of the paper is organized as follows. In Section 2 we study sparse random power-law intersection graphs with index α ∈ (1; 2), introduce the result on "rainbow" cliques in extremal combinatorics (Lemma 2.8) and prove Theorem 1.1. In Section 3 we relate our model to the balls and bins model and prove Theorem 1.2. In Section 4 we present and analyse algorithms for finding large cliques in G(n, m, P ). In Section 5 we prove Lemmas 1.5 and 1.6. Finally we give some concluding remarks.
2 Power-law intersection graphs 2.1 Proof of Theorem 1.1 We start with introducing some notation. Given a family of subsets {S v , v ∈ V ′ } of an attribute set W ′ , we denote G(V ′ , W ′ ) the intersection graph on the vertex set V ′ defined by this family: u, v ∈ V ′ are adjacent (denoted u ∼ v) whenever S u ∩S v = ∅. We say that an attribute w ∈ W ′ covers the edge u ∼ v of G(V ′ , W ′ ) whenever w ∈ S u ∩ S v . In this case we also say that the edge u ∼ v receives colour w. In particular, an attribute w covers all edges of the (monochromatic) clique subgraph T w of G(V ′ , W ′ ) induced by the vertex set T w = {v ∈ V ′ : w ∈ S v }. Given a graph H, we say that G(V ′ , W ′ ) contains a rainbow H if there is a subgraph H ′ ⊆ G(V ′ , W ′ ) isomorphic to H such that every edge of H ′ can be prescribed an attribute that covers this edge so that all prescribed attributes are different.
We denote by e(G) the size of the set E(G) of edges of a graph G. Given two graphs G = (V (G), E(G)) and R = (V (R), E(R)) we denote by G ∨ R the graph on vertices V (G) ∪ V (R) and with edges E(G) ∪ E(R). In what follows we assume that V (G) = V (R) if not mentioned otherwise. Let t be a positive integer and let R be a non-random graph on the vertex set V ′ . Assuming that subsets S v , v ∈ V ′ are drawn at random, introduce the event Rainbow(G(V ′ , W ′ ), R, t) that the graph G(V ′ , W ′ ) ∨ R has a clique H of size |V (H)| = t with the property that every edge of the set E(H) \ E(R) can be prescribed an attribute that covers this edge so that all prescribed attributes are different.
In the case where every vertex v of the random intersection graph G(n, m, P ) includes attributes independently at random with probability p = p(n), the size X v := |S v | of the attribute set has binomial distribution P ∼ Binom(m, p). We denote such graph G(n, m, p) and call it a binomial random intersection graph. We note that for mp → +∞ the sizes X v of random sets are concentrated around their mean value E X v = mp. An application of Chernoff's bound (see, e.g., [16]) where B is a binomial random variable B ∼ Binom(m, p) and 0 < ǫ < 3/2, implies for any y = y(n) such that y/ √ mp ln n → ∞ and y/(mp) < 3/2. We write a ∧ b = min{a, b} and a ∨ b = max{a, b}. Let us prove Theorem 1.1. For every member G(n) = G(V, W ) of a sequence {G(n)} satisfying conditions of Theorem 1.1 and a number ǫ 1 ∈ (0, ǫ 0 ) define the subgraphs G i ⊆ G(n), i = 0, 1, 2, induced by the vertex sets respectively. Here X v = |S v | denotes the size of the attribute set prescribed to a vertex v and the numbers θ 1 = θ 1 (n) = m 1/2 n −ǫ1 ; θ 2 = θ 2 (n) = ((1 − α/2)m ln n + me 1 ) 1/2 , with e 1 = e 1 (n) = max(0, ln L((n ln n) 1/2 )). Note that e 1 ≡ 0 for L(x) ≡ 1. We have V = V 0 ∪ V 1 ∪ V 2 and V i ∩ V j = ∅ for i = j. Theorem 1.1 follows from the three lemmas below. Let K = K(n) be as in Theorem 1.1. The first lemma gives a lower bound for the clique number of G(n).
The next two lemmas provide an upper bound.

Proof of Lemma 2.1
In this section we use ideas from [12] to give a lower bound on the clique number. We first note the following auxiliary facts.
Lemma 2.4 Suppose a = a n , b = b n are sequences of positive reals such that 0 < ln 2b + 2a → +∞. Let z n be the positive root of Then Proof Changing the variables t = 2bz 2 we get t + ln(t) = 2a + ln(2b).
From the assumption it follows that t + ln t ∼ t and therefore z n ∼ 2a+ln(2b)

2b
. ✷ Lemma 2.5 ( [10]) Let x → +∞. For any slowly varying function L and any Proof of Lemma 2.1 Write N = |V 2 | and let v (1) , v (2) , . . . , v (N ) be the vertices of V 2 listed in an arbitrary order. Consider a greedy algorithm for finding a clique in G proposed by Janson, Luczak and Norros [12] (they use descending ordering by the set sizes, see also Section 4). Let A 0 = ∅. In the step i = 1, 2, . . . , N let This algorithm produces a clique H on the set of vertices A N , and H demonstrates that ω(G 2 ) ≥ |A N |.
Write θ = θ 2 and let L θ = V 2 \ A N be the set of vertices that failed to be added to A N . We will show that From (2) we obtain for N ∼ Binom(n, q) with q = P(X n > θ) Here we used L((n/m) 1/2 θ) ∼ L( √ n ln n) and ln L( √ n ln n) = o(ln n), see Lemma 2.5. Furthermore, by the concentration property of the binomial distribution, see, e.g., Let p 1 be the probability that two random independent subsets of W = [m] of size ⌈θ⌉ do not intersect. The number of vertices in L θ is at most the number of pairs in x, y ∈ V 2 where S x and S y do not intersect. Therefore by the first moment method This completes the proof. Let us briefly explain the intuition for the choice of θ. For simplicity assume L(x) ≡ 1 so that e 1 = 0. Could the same method yield a bigger clique if θ 2 is smaller? We remark that the product p 1 E N as well as its upper bound n 1−α/2 m α/2 θ −α e −θ 2 /m (which we used above) are decreasing functions of θ. Hence, if we wanted this upper bound to be o(1) then θ should be at least as large as the solution to the equation or, equivalently, to the equation After we write the latter relation in the form (13) where a = α −1 ln n+(1/2) ln(m/n) and b = (αm) −1 satisfy be 2a = α −1 n 2 α −1 → +∞, we obtain from Lemma 2.4 that the solution θ of (14) satisfies

Proof of Lemma 2.2
Before proving Lemma 2.2 we collect some preliminary results.
Proof The case a = 1 follows from Claim 2 of [14]. For the case a = 0 we have, by the first moment method, ✷ Next is an upper bound for the size ω ′ (G) of the largest monochromatic clique.
Proof Let X = X(n) and Y = Y (n) be defined as in (1). Since for any w ∈ W and v ∈ V and the number of elements of the set we have, for any positive integer k Therefore, by the union bound, ✷ The last and the most important fact we need relates the maximum clique size with the maximum rainbow clique size in an intersection graph. An edge-colouring of a graph is called t-good if each colour appears at most t times at each vertex. We say that an edge-coloured graph contains a rainbow copy of H if it contains a subgraph isomorphic to H with all edges receiving different colours.
There is a constant c such that every t-good coloured complete graph on more than cth 3 ln h vertices contains a rainbow copy of K h .
Proof of Lemma 2.2 Fix an integer h > 1 + 1 ǫ1 and denote t = n 1−α/2−δ and k = ⌈ cth 3 ln h ⌉, where positive constants δ and c are from Lemmas 2.7 and 2.8, respectively. We first show that We note that for the binomial intersection graphG = G(n, m, LetS v (respectively S v ), v ∈ V , denote the random subsets prescribed to vertices ofG (respectively G(n)). Given the set sizes for each v, we couple the random sets of G 0 andG so that S v ⊆S v , for all v ∈ V 0 . Now G 0 becomes a subgraph ofG and (16) follows from (17) and the fact that min v |S v | > θ whp, see (12). Next, we colour every edge x ∼ y of G 0 by an arbitrary element of S x ∩ S y and observe that the inequality ω ′ (G(n)) ≤ t (which holds with probability 1 − o(1), by Lemma 2.7) implies that the colouring obtained is t-good. Furthermore, by Lemma 2.8, every k-clique of G 0 contains a rainbow clique; however the probability of the latter event is negligibly small by (16). We conclude that P(ω(G 0 ) ≥ k) = o(1) thus proving the lemma. ✷

Proof of Lemma 2.3
We start with a combinatorial lemma which is of independent interest. Suppose that a 1 + · · · + a k ≤ m. Then the probability is maximised when {A i } are mutually disjoint.
Proof Call any of m d possible outcomes c for S a configuration.
Suppose the claim is false. Out of all families that maximize (18) pick a family F with smallest p(F ). Then p(F ) > 0 and we can assume that there is an element Observe that the family of configurations C = C DR (F ) \ C DR (F ′ ) has the following property: for each c ∈ C we have x ∈ c and it is not possible to find a set of distinct representatives for c ∩ F where A 1 is matched with an element other than x (indeed such a set of distinct representatives, if existed, would imply c ∈ C DR (F ′ )). Consequently, there is a set of distinct representatives for sets c ∩ A 2 , . . . , c ∩ A k which does not use x. Since the latter set of distinct representatives together with y is a set of distinct representatives for c ∩ F ′ , we conclude that c ∈ C DR (F ′ ) implies y / ∈ c. Now, for c ∈ C, let c xy = (c ∪ {y}) \ {x} be the configuration with x and y swapped. Then c xy ∈ C DR (F ) and c xy ∈ C DR (F ′ ), because y ∈ c xy and can be matched with A 1 . Thus each configuration c ∈ C is assigned a unique configuration which contradicts our assumption about the minimality of p(F ). ✷ The next lemma is a version of a result of Erdős and Rényi about the maximum clique of the binomial random graph G(n, p) (see, e.g., [13]). Lemma 2.10 Let n → +∞. Assume that probabilities p n → 1. Let {r n } be a positive sequence, satisfying r n = o(K 2 ), whereK = 2 ln n 1−pn . There are positive sequences {δ n } and {ǫ n } converging to zero, such that δ nK → +∞ and for any sequence of non-random graphs {R n } with V (R n ) = [n] and e(R n ) ≤ r n the number X n of cliques of size Proof Write p = p n , r = r n and h = 1 − p. Pick a positive sequence δ = δ n so that δ n → 0 and ln −1 n + h + r where, by the inequality ln p ≤ −h, for n large enough, ✷ Lemma 2.11 Let {G(n)} be a sequence of binomial random intersection graphs, where m = m n → +∞ and p = p n → 0 as n → +∞. Let {r n } be a sequence of positive integers. DenoteK = 2e mp 2 ln n. Assume that r n ≪K 2 and There are positive sequences {ǫ n }, {δ n } converging to zero such that δ nK → +∞ and for any non-random graph sequence Here we choose {δ n } such thatK(1 + δ n ) were an integer.
Proof Let {x n } be a positive sequence such that px n → 0, x n ≪ mp and mp ln n ≪ x n (one can take, e.g., x n = ϕ n √ mp ln n, with ϕ n ↑ +∞ satisfying ϕ 2 nK p → 0). Given n, we truncate the random sets S v , prescribed to vertices v ∈ V of the graph G = G(n, m, p), to the size M = ⌊mp + x n ⌋. Denotē We remark that for the event Now, let t ∈ [K; 2K] and let T = {u 1 , . . . , u t } be a subset of V of size t. By R T we denote the subgraph of R n induced by the vertex set T . Given i ∈ {1, . . . , t}, let We shall prove below that whenever n is large enough Next, proceeding as in Lemma 2.10 we find positive sequences {δ ′ n }, {ǫ ′ n } converging to zero such that the number X ′ n of subsets T ⊆ V of size that satisfy the event A T has expected value E X ′ n ≤ ǫ ′ n . For this purpose, we apply (19) to a ′ and p ′ = 1−(1−p) M , and use (23). We remark that a ′ =K(1+δ ′′ n ), where {δ ′′ n } converges to zero and δ ′′K → +∞. Indeed, we have δ ′ n ln n/(1 − p) M → +∞, by Lemma 2.10, and we have ( In particular, for large n, we have a ′ ∈ [K, 2K]. The key observation of the proof is that events B and Rainbow(G, R n , a ′ ) imply X ′ n > 0. Hence, In the last step we used Markov's inequality. Finally, invoking (22) we obtain (21).
It remains to show (23). We write and evaluate, for 1 ≤ i ≤ t, Now (23) follows from the simple identity 1≤i≤t |T i | = t 2 − e(R T ). Let us prove (24). For this purpose we apply Lemma 2.9. We first condition on {S u , u ∈ T i } and the size |S vi | of S vi . By Lemma 2.9 the conditional probability is maximized when the setsS u , u ∈ T i are mutually disjoint (at this step we check the condition of Lemma 2.9 that u∈Ti |S u | ≤ tM < m, for large n). Secondly, we drop the conditioning on |S vi | and allow S vi to choose its element independently at random with probability p. In this way we obtain (24). Then there is a sequence {δ n } converging to zero such that δ nK → +∞ and P ω(G(n)) >K(1 + δ n ) → 0.
Proof Given n, let U be a random subset of V = V (G(n)) with binomial number of elements |U | ∼ Bin(n, p) and such that, for any k = 0, 1, . . . , conditionally, given the event |U | = k, the subset U is uniformly distributed over the class of subsets of V of size k. Recall that T w ⊆ V denotes the set of vertices that have chosen an attribute w ∈ W . We remark that T w , w ∈ W are iid random subsets having the same probability distribution as U .
We call an attribute w big if |T w | ≥ 3, otherwise w is small. Let W B and W S denote the sets of big and small attributes. Denote by G B (respectively, G S ) the subgraph of G = G(n) consisting of edges covered by big (respectively, small) attributes. We observe that, given G B , the random sets T z , z ∈ W S , defining the edges of G S are (conditionally) independent. We are going to replace them by bigger sets, denoted T ′ z , by adding some more elements as follows. Given T z , we first generate independent random variables I z and |∆ z |, where I z has Bernoulli distribution with success probability p ′ = P(|U | ≤ 2) and where P( drawn uniformly at random. We note that given G B , the random sets T ′ z , z ∈ W S are (conditionally) independent and have the same probability distribution as U . Next we generate independent random subsets T ′ w of V , for w ∈ W B , so that they have the same distribution as U and were independent of G S , G B and T ′ z , z ∈ W S . Given G B , the collection of random sets {T ′ w , w ∈ W B ∪ W S } defines the binomial random intersection graph G ′ having the same distribution as G(n, m, p).
We remark that G S ⊆ G ′ and every edge of G S can be assigned a unique small attribute that covers this edge and the assigned attributes are all different. On the other hand, the graph G B is relatively small. Indeed, since each w covers |Tw| 2 edges, the expected number of edges of G B is at most Invoking the simple bound we obtain E e(G B ) = O(m(np) 3 ). Now we choose an integer sequence {r n } such that m(np) 3 ≪ r n ≪K 2 and write, for an integer K ′ > 0, Here, by Markov's inequality, P(e(G B ) ≥ r n ) ≤ r −1 n E e(G B ) = o(1). Furthermore, we observe that ω(G) ≥ K ′ implies the event Rainbow(G ′ , G B , K ′ ). Hence, We choose K ′ =K(1 + δ n ) and apply Lemma 2.11 to the conditional probability on the right. At this point we specify {δ n } and find ǫ n ↓ 0 such that Now we are ready to prove Lemma 2.3.
Proof of Lemma 2.3 Let and letḠ 1 be the subgraph of To prove the lemma we write ω(G 1 ) ≤ D +ω(Ḡ 1 ) and show that each summand on the right is of order o P (K) for appropriately chosen ǫ = ǫ(n) → 0.
Using (2) and Lemma 2.5 we estimate the expected value of D for n → +∞ Here h(ǫ) : We complete the proof by showing that for any ε satisfying (26) Note that n 1−2 −1 ǫ−2 −1 α ln n ≪ K.

Finite variance
In this section we prove Theorem 1.2. We note that the random power-law graph studied by Janson, Luczak and Norros [12] whp does not contain K 4 as a subgraph if the degree distribution has a finite second moment. In our case a similar result holds for the rainbow K 4 . Given a sequence of random intersection graphs {G(n)}, we show that the number of rainbow K 4 subgraphs of G(n) is stochastically bounded as n → +∞ provided that the sequence of the second moments of the degree distributions is bounded. If, in addition, the sequence of degree distributions is uniformly square integrable, then G(n) has no rainbow K 4 whp, see Lemma 3.3 below. We use these observations in the proof of Theorem 1.2.

Large cliques and rainbow K 4
Let U be a finite set and let C = {C 1 , . . . , C r } be a collection of (not necessarily distinct) subsets of U . We consider the complete graph K U on the vertex set U and interpret subsets C i as colours: an edge x ∼ y receives colour C i (or just i) whenever {x, y} ⊆ C i . We call C a clique cover if every edge of the clique K U receives at least one colour. The edges spanned by the vertex set C i form a subclique, which we call the monochromatic clique of colour i. We say that a vertex set S ⊆ U is a witness of a rainbow clique if every edge of the clique K S induced by S receives a non-empty collection of colours and it is possible to assign each edge one of its colours so that all edges of K S were assigned different colours. We start with a result that relates clique covers to rainbow clique subgraphs. For a clique cover C = {C 1 , . . . , C r } denote by p(C) = max i =j |C i ∩ C j | the size of maximum pairwise intersection. . . , C r } be a clique cover of a finite set U and assume that max C∈C |C| ≥ |U | − h and p(C) ≤ p.
If, in addition, |U | ≥ t(k, p), where t(k, p) = c h 3 ln h p √ 2k + 5 + 2p , then C produces at least k witnesses of rainbow K 4 . Here c is the absolute constant of Lemma 2.8.
We note that C has no rainbow K h since otherwise there would be at least h 4 ≥ k copies of rainbow K 4 . Observe, that every monochromatic subclique of K U has at most b vertices. Hence, each colour appears at most b − 1 times at each vertex of K U . By Lemma 2.8, K U has at most c(b − 1)h 3 / ln h vertices. That is, b > a|U |, where a = ln h ch 3 and c is an absolute constant. Fix B ∈ C with |B| = b and a subset S ⊆ U \ B of size h, say S = {x 1 , . . . , x h }. Here we use the assumption |U | ≥ b + h telling that U \ B has at least h elements, |U \ B| = |U | − b ≥ h. We remark, that at least one pair of vertices of S, say {x 1 , x 2 }, receives at most 5 colours (it is covered by at most 5 sets from C). Indeed, otherwise every edge of K S received at least 6 distinct colours and, thus, each S ′ ⊆ S of size |S ′ | = 4 induced a rainbow K 4 . This contradicts to our assumption that there are fewer than k ≤ h 4 rainbow copies of K 4 . We observe that the set of colours received by the pair {x 1 , x 2 } is non-empty (since C is a clique cover) and fix one such colour, say C x1,x2 ∈ C. Now, consider the set of pairs {{x 1 , y}, y ∈ B} and pick a smallest family of sets from C such that each pair were covered by a member of the family (the smallest family means that any other family with fewer members would leave at least one uncovered pair). Since each member of the family intersects with B in at most p vertices (condition of the lemma) we conclude that such a family contains at least ⌈b/p⌉ members. Furthermore, since the family is minimal, every member covers a pair {x 1 , y} which is not covered by other members. Hence, we can pick a set B 1 ⊆ B of size ⌈b/p⌉ so that every {x 1 , y}, y ∈ B 1 is covered by a unique member, say C x1,y , of the family.
Next, remove from B 1 the elements y such that x 2 ∈ C x1,y (there are at most 5 of them). Then remove those elements y which belong to the set C x1,x2 (there are at most p of them, since |C x1,x2 ∩ B| ≤ p). Call the newly formed set B ′ . Notice that Let us consider the cliqueK on the vertex set B ′ ∪{x 1 , x 2 }. For y ∈ B ′ , colour each edge {x 1 , y} ofK with the colour C x1,y . Colour the edge {x 1 , x 2 } with C x1,x2 and for every edge {y i , y j } ∈ B ′ use the colour B. Finally, for y ∈ B ′ , assign {x 2 , y} an arbitrary colour from the set of colours received by {x 2 , y} from the clique cover C. We claim that for any y 1 ∈ B ′ and any y 2 ∈ B ′ \ C x2,y1 , the set {x 1 , x 2 , y 1 , y 2 } witnesses a rainbow K 4 . Indeed, by the construction, the colour C x1,x2 of the edge {x 1 , x 2 } occurs only once, because B ′ ∩ C x1,x2 = ∅. Similarly, for x 1 , x 2 ∈ B, the colour B of {y 1 , y 2 } occurs only once. The colours of the two other edges incident to x 1 occur only once, since we removed all candidates y such that x 2 ∈ C ix 1 ,y , while constructing the set B ′ . Finally, we have C x2,y1 = C x2,y2 since we chose y 2 outside C x2,y1 .
How many such witnesses can we form? For any y 1 we choose |B ′ | − |B ′ ∩ C x2,y1 | ≥ |B ′ | − p suitable y 2 . Repeating this for each y 1 we will produce every 4-set at most twice. ThereforeK contains at least witnesses of rainbow K 4 . But since the total number of witnesses of rainbow K 4 produced by C is less that k, the right-hand side of (31) is less than k. We obtain the inequality |U | < p a √ 2k + 5 + 2p = t(k, p), which contradicts to the condition |U | ≥ t(k, p). ✷ In the remaining part of the subsection 3.1 we interpret attributes w ∈ W as colours assigned to edges of a random intersection graph. Lemma 3.2 Let G = G(k, m, P ) be a random intersection graph and let X 1 , . . . , X k denote the sizes of random sets defining G. For any integers x 1 , . . . , x k such that the event B = {X 1 = x 1 , . . . , X k = x k } has positive probability, we have Proof Our intersection graph produces a rainbow clique on its k vertices whenever for some injective mapping, say f , from the set of pairs of vertices to the set of attributes, the event A f = {every pair {x, y} is covered by f ({x, y})} occurs. By the independence, Since there are (m) ( k 2 ) possibilities to choose the map f , we obtain, by the union bound, Furthermore, if for some positive sequence ǫ n → 0 we have nP(Y (n) ≥ ǫ n n 1/2 ) → 0 then G(n) does not contain a rainbow K 4 whp.
Proof of Lemma 3.3 Denote X v = |S v (n)| and Y = Y (n). We write, using symmetry and the bound of Lemma 3.2, Next, we apply the simple inequality a 6 ∧ 1 ≤ a 4 and bound the right-hand side from above by n 4

4!
For the second part of the lemma, let b = b(n) = ǫ n √ m and let A = A(n) be the event that max v∈V X v ≤ b. LetĀ denote the complement event. We write By the union bound the second term is at most The first term by Lemma 3.2 satisfies .

✷
The next result shows that the structure of random intersection graphs with E Y (n) 2 = O(1) is relatively simple. The lemma says that the intersection of any two monochromatic cliques of G(n) consists of at most one edge whp.
Proof For any pair of attributes w ′ , w ′′ and a vertex v of G(n), we have Here c > 0 does not depend on m and n. By the union bound, the probability that there is a pair of attributes shared by k or more vertices is at most This probability tends to zero for any k ≥ 3. ✷ Proof of Theorem 1.2 Let R = R(n) denote the number of 4-sets S ⊆ V (G(n)) witnessing rainbow K 4 in G(n). By Lemma 3.4, the intersection of any two monochromatic cliques has at most 2 vertices whp. In that case, by Lemma 3.1 (applied to the set of vertices U of the largest clique) either ω(G(n)) < t(R + 1, 2) or ω(G) ≤ ω ′ (G) + h(R + 1). Thus, If nP(Y (n) > ǫ n n 1/2 ) → 0 for some ǫ n → 0 then by Lemma 3.3 G(n) whp does not contain a rainbow K 4 , so whp ω(G) ≤ t(1, 2) ∨ (ω ′ (G) + 3). ✷

Monochromatic cliques and balls and bins
Here we prove Theorem 1.3. In the proof we use the fact that the maximum bin load M (N, m) is a "smooth" function of the first argument N , see lemma below.  In order to generate an instance of G(n) we draw a random sample X 1 , . . . , X n from the distribution P (n). Then choose random subsets S vi ⊆ W of size X i , v i ∈ V , by throwing balls into m bins labelled w 1 , . . . , w m (the j-th bin has label w j and index j) as follows. Keep throwing balls labelled i = 1 until there are exactly X i different bins containing a ball labelled i. Do the same for i = 2, . . . , n. Now, for each i, the bins containing balls labelled i make up the set S vi . In this way we obtain an instance of G(n). Let X ′ i denote the number of balls of label i thrown so far. Clearly, X ′ 1 , . . . , X ′ n is a sequence of independent random variables and X ′ i ≥ X i , for each i. We stop throwing balls if the number of balls N ′ = i X ′ i at least as large asN + . Otherwise we throw additionalN + − N ′ unlabelled balls into bins.
Let us inspect the bins after j balls have been thrown. Let M(j) denote the set of balls contained in the bin with the largest number of balls and the smallest index. We note that the number M (j) = |M(j)| of balls in that bin has the same distribution as M (j, m) (random variable defined before Theorem 1.3).
Denote, for short, ω ′ = ω ′ (G(n)) andM = M (⌊N ⌋). We observe that the event Now, (34) implies P(ω ′ =M ) = 1 − o(1) and, since the distributions of M (⌊N ⌋, m) andM coincide, we obtain It remains to prove (34). Let us consider P(A 3 ). We first replace X i and X ′ i by the truncated random variables Furthermore, by the union bound and Markov's inequality, we have since m = Ω(n) and ǫ 2 n → +∞. Hence, P(A 3 ) ≥ P(Ã 3 ) − o(1). Secondly, we prove that P(Ã 3 ) = 1 − o (1). For this purpose we show that, for large n, The proof of (35) is routine. Notice that conditionally, givenX i = k, we havẽ respectively. SinceX i ≤ ǫ m, we only consider k < ǫm, so In the last step we used ǫ ≤ 1/2. We conclude that From (36) we obtain Furthermore, invoking in (37) the inequalities E X 1 − s ≤ EX 1 ≤ E X 1 , where we obtain the first part of (35). The second part of (35) follows from the inequalities by Chebyshev's inequality. Let us show (38). Proceeding as in the proof of (36) we evaluate the conditional variance and obtain Furthermore, using (36) we write Collecting these estimates we obtain an upper bound for the variance This bound implies (38). We have shown (34) for r = 2. Let us prove (34) for r = 1. We start with an auxiliary inequality. Given integers x 1 , . . . , x n ≥ 0 consider a collection of k = x 1 + · · · + x n > 0 labelled balls, containing x i balls of label i, 1 ≤ i ≤ n. The probability of the event that a random subset of r balls contains a pair of equally labelled balls is Here L counts pairs of equally labelled balls in the random subset. We will show that P(Ā 1 ) = o(1). To this aim, we introduce events and show that each summand on the right is o (1). For the first summand we estimate using (39) It remains to show P(Ā r ) = o(1), for r = 5, 6. We write P(Ā 5 ) = P(Ā 5 ∩ A 3 ) + o(1) and estimate (40) Here Z j denotes the number of balls in the jth bin afterN + balls have been thrown. In the second inequality we applied the union bound and used the fact that Z 1 , . . . , Z m are identically distributed. To get the very last bound we write for binomially Bin(N + , m −1 ) distributed Z 1 and t = ⌊ln n⌋, To estimate P(Ā 6 ) we apply Markov's inequality,

Algorithms for finding the largest clique
Random intersection graphs provide theoretical models for real networks, such as the affilation (actor, scientific collaboration) networks. Although the model assumptions about the distribution of the family of random sets defining the intersection graph are rather stringent (independence and a particular form of the distribution), these models yield random graphs with clustering properties similar to those found in real networks, [6]. While observing a real network we may or may not have information about the sets of attributes prescribed to vertices. Therefore it is important to have algorithms suited to random intersection graphs that do not use any data related to attribute sets prescribed to vertices. In this section we consider two such algorithms that find cliques of order (1 + o(1))ω(G) in a random intersection graph G.
The Greedy-Clique algorithm of [12] finds a clique of the optimal order (1 − o P (1))ω(G) in a random intersection graph, in the case where (asymptotic) degree distribution is a power-law with exponent α ∈ (1; 2).

Greedy-Clique(G):
Let Here we assume that graphs are represented by the adjacency list data structure. The implicit computational model behind our running time estimates in this section is random-access machine (RAM). By Lemma 1.5, the above result remains true if the conditions (2) and E Y (n) = Θ(1) are replaced by the conditions (6) and E D 1 = Θ(1). Proposition 4.1 is proved in a similar way as Lemma 2.1, but it does not follow from Lemma 2.1, since Greedy-Clique is not allowed to know the attribute subset sizes. The proof of Proposition 4.1 is given in the extended version of the paper [8].
For random intersection graphs with square integrable degree distribution we suggest the following simple algorithm. Mono-Clique(G): Here Γ(v) denotes the set of neighbours of v. if there is a sequence {ω n }, such that ω n → ∞ and ω(G(n)) ≥ ω n whp, then |C| = ω(G(n)) whp.
Conditioning on X 1 , X 2 , X 3 , X 4 and using the union bound and independence we obtain, similarly as in Lemma 3.2 Furthermore, by symmetry, Proof LetZ denote the number of 4-cycles in G(n), i.e., the number of tuples We will prove below that Consider the running time of the first loop. We can assume that the elements in each list in the adjacency list structure are sorted in increasing order (recall that vertices are elements of V = [n]). Otherwise, given G(n), they can be sorted using any standard sorting algorithm in time The intersection of two lists of lengths k 1 and k 2 can be found in O(k 1 +k 2 ) time, so that expected total time for finding common neighbours is The last estimate follows by (56) in the proof of Lemma 1.6.
The second loop can be implemented so that the next edge uv with largest value of D(uv) is found at each iteration (i.e., we do not sort the list of edges in advance). In this way picking the next edge requires at most ce(G(n)) steps c is a universal constant. We recall that the number of edges uv ∈ E(G) with Γ(u, v) := Γ(u) ∩ Γ(v) = ∅ that fail to induce a clique is at most the number Z of cycles considered in the proof of Theorem 4.2 above. Therefore, the total number of steps used in picking D(uv) in decreasing order is at most Z e(G(n)) = (i,j,k,l) I C(i,j,k,l) e(G(n)). ≤ P(C(i, j, k, l))E e(G(n)).
Finally, invoking the simple bound E e(G(n)) = n 2 P(u ∼ v) = O(n), and (41) we get E Z e(G(n)) ≤ (E e(G(n))+4n) (i,j,k,l) P(C(i, j, k, l)) = (E e(G(n))+4n)E Z = O(n). Now let us estimate the time of the rest of the iteration of the second loop. The total expected time to find common neighbours is again O(n), so we only consider the time spent for checking if Γ(u, v) is a clique. This requires c s 2 uv steps, where we denote s uv = |Γ(u, v)|. Observe that u, v and Γ(u, v) yield at least s uv (s uv − 1) 4-cycles in G(n) of the form (u, x, v, y), x, y ∈ Γ(u, v). Summing over all edges uv and noticing that each 4-tuple corresponding to 4-cycle in G(n) can be obtained at most once, we get So using (42) and the fact that E e(G(n)) = O(n) we obtain Finally, let us bound EZ. Let A i , 1 ≤ i ≤ 4 be as in the proof of Theorem 4.2. Let A 5 be the event that there is w ∈ W such that w ∈ S 1 ∩ S 2 ∩ S 3 ∩ S 4 . Using the union bound Similarly as in the proof of Theorem 4.2 (we have to consider three other events similar to A 2 and A 4 ), EZ ≤ (n) 4 (P(A 1 ) + 4P(A 2 ) + 2P(A 4 ) + P(A 5 )) = O(n).

✷
Combining the next lemma with Theorem 1.3 we can show that Mono-Clique whp finds a clique of size at least ω ′ (G(n)). The proof is given in the extended version of the paper [8].

Equivalence between set size and degree parameters
Here the random variable Y 1 (n) := (n/m) 1/2 X 1 (n) has the same distribution as Y (n). We prove (48) and (49) by contradiction.
Here we proceed as in (52) above. We write P(D 1 (n k ) < b k |Y 1 (n k ) ≥ l k ) ≤ P(D 1 (n k ) < b k |C) and show that binomial probability on the right-hand side is O(n −10 ) using Chernoff's inequality. ✷ Proof of Lemma 1.6 The identity (9) follows from (44) since Let us show (10). Denote N the number of 2-stars in G = G(n) centered at vertex 1 ∈ V = [n]. Introduce the events A ij = {i ∼ j}, i, j ∈ V . Write, for short, A = A 12 ∩ A 13 . LetP denote the conditional probability given the sizes X 1 , X 2 , X 3 of the random subsets prescribed to vertices 1, 2, 3 ∈ V . We remark that (10) follows from (9) Let us prove (55). For this purpose we write (using the conditional independence of events A 12 and A 13 , given X 1 , X 2 , X 3 ) and evaluate conditional probabilitiesP(A ij ) using (45). From the first inequality of (45) we obtain the first inequality of (55) P(A) = EP(A 12 )P(A 13 ) ≤ E (X 2 1 X 2 X 3 )/m 2 = (E Y ) 2 E Y 2 /n 2 . Thus, even without the assumption (8) (we use this fact this in the proof of Proposition 4.3), we have To show the second inequality of (55) we apply the second inequality of (45) and use truncation. We denote I i = I {Xi≤ǫnm 1/2 } ,Ī i = 1 − I i and write, cf. (46), In the last step we used the fact that E Y 2 ≥ (E Y ) 2 = Ω(1) and the bounds E X 2 1Ī1 = (m/n) E Y 2 I {Y >ǫnn 1/2 } = o(E X 2 ), E X jĪj = (m/n) 1/2 E Y I {Y >ǫnn 1/2 } = o(E X), j = 2, 3.

✷ 6 Concluding remarks
In this work we determined the order of the clique number in G(n, m, P ) for a wide range of m = m(n) and P = P (n). We saw that in sparse power-law random intersection graphs with unbounded degree variance, the clustering property of G(n, m, P ) has little influence in the formation of the maximum clique. This suggests that simpler models, such as the one in [12], may be preferable in the case of very heavy degree tails. However, when the degree variance is bounded, most random graph models, including the Erdős-Rényi graph and the model of [12] have only bounded size cliques whp. In contrast, we showed that in random intersection graphs the clique number can still diverge slowly. We have a kind of "phase transition" as the tail index α for the random subset size (degree) varies, see (2). Assume, for example that m = Θ(n). When α < 2, the random graph G(n, m, P ) whp contains cliques of only logarithmic size. When α > 2, it whp contains a 'giant' clique of polynomial size. But what happens when (2) is satisfied with α = 2 but the degree variance is unbounded?
We proposed a surprisingly simple algorithm for finding (almost) the largest clique in sparse random intersection graphs with finite degree variance. The performance of both Greedy-Clique and Mono-Clique algorithms can be of further interest, since these algorithms do not use the possibly hidden random subset structure. How well would they perform on arbitrary sparse empirical networks? Can we suspect a hidden intersecting sets structure for networks where the Mono-Clique algorithm performs well?
Another direction of possible future research would be to determine the asymptotic clique number in dense random intersection graphs (alternatively, the order of the largest intersecting set in dense random hypergraphs). For example, even in the random uniform hypergraph case where m = Θ(n) and the random subset size X(n) = Ω(n 1/2 ) is deterministic, exact asymptotics of the clique number remain open.