Modelling and Computation for Social Networks