Modeling and Optimization for Mobile Social Networks