The effect of preference similarity on the formation of clusters and the connectivity of social networks