Matching users profile in virtual communities can represent the most natural way of representing group homogeneity, i.e. how much the group members are mutually linked. However, optimizing profile matching does not guarantee the group cohesion, i.e. that the group will continue to be homogeneous in time. Moreover, computing profile matching in large virtual communities can be very expensive, and cannot be integrated in a fully distributed system. In the past, we have demonstrated that using users mutual trust, along with profile matching, can help to improve groups homogeneity. In this work we demonstrate, by an extended set of experiments on datasets extracted from real communities, that trust measures can effectively replace profile matching in order to optimize group's cohesion. A further interesting result is represented by the fact that it is also possible to replace the global trust measure with a local measure of trust, called local reputation, which is not highly sensitive to the size of the network, thus allowing to perform computations which are limited on the size of the ego-network of the single node.