Inter-group relations and social diversity