Forbes’ algorithm reveals how much some of the wealthiest people in the world give back to their communities.