Graph method for computing user similarity, using threading library. The number of nodes and number of users can be given as parameters.