Scalable Algorithms for Mining Graphs and Social Networks via Sampling