The formation of partnerships in social networks