Mathematical Foundations for Social Computing