In addition to original balls and baskets problem I mentioned here : http://stackoverflow.com/questions/1948311/balls-and-baskets-problem-algorithm
There is a slightly different problem.
Still there are N people and they have unlimited balls but they dont have baskets this time.
Problem is :
There are N people with unlimited balls and M different baskets. People throw balls to baskets.
I want to find the groups of people who are throwing balls to the same baskets.
Person A throws to Baskets 1 , 2, 4, ,6,7, 14, 51, 32 Person B throws to Baskets 3, 4, 6, 7, 14,15, 16, 64,43 Person C throws to Baskets 3, 4, 6,7,5, 87, 42, 32, 52, 55 . . . etc.
In this example person A and B may be well connected (lets say friends) (4,6,7,14 common) and C may be connected to them too but not so well connected. (4, 6,7 common)
I want to find groups of 4-5 people like that in a very large database of people.