Abstract : Motivated by an assignment problem arising in MapReduce computations, we investigate a generalization of the Bin Packing problem which we call Bin Packing with Colocations Problem. We are given a weigthed graph G = (V, E), where V represents the set of items with positive integer weights and E the set of related (to be colocated) items, and an integer q. The goal is to pack the items into a minimum number of bins so that (i) for each bin, the total weight of the items packed in this bin is at most q, and (ii) for each edge (i, j) ∈ E there is at least one bin containing both items i and j. We first point out that, when the graph is unweighted (i.e., all the items have equal weights), the problem is equivalent to the q-clique problem, and when furthermore the graph is a clique, optimal solutions are obtained from Covering Designs. We prove that the problem is strongly NP-hard even for paths and unweighted trees. Then, we propose approximation algorithms for particular families of graphs, including: a (3+ √ 5)-approximation algorithm for complete graphs (improving a previous ratio of 8), a 2-approximation algorithm for paths, a 5-approximation algorithm for trees, and an (1 + O(log q/q))-approximation algorithm for unweighted trees. For general graphs, we propose a 3 + 2mad(G)/2-approximation algorithm, where mad(G) is the maximum average degree of G. Finally, we show how to convert any approximation algorithm for Bin Packing (resp. Densest q-Subgraph) problem into an approximation algorithm for the problem on weighted (resp. unweighted) general graphs.