public void generateNumOfDistinctUsersVsFreq() throws IOException {

        numUsersVsFreqFileWriter = new BufferedWriter(new FileWriter(numUsersVsFreqFile));

        HashSet<Long> users = new HashSet<Long>();
        TreeMap<Integer, Integer> numberOfDistinctUserVsFrequency = new TreeMap<Integer, Integer>();

        for( Long rootId : roots ) {

            users.clear();

            /*for( Long childId : adjacencyList.get(rootId) ) {
                users.add(tweetIdVsUserId.get(childId));
            }*/

            Queue<Long> q = new LinkedList<Long>();
            q.add(rootId);

            while ( !q.isEmpty() ) {

                Long id = q.poll();
                users.add(tweetIdVsUserId.get(id));

                if( adjacencyList.containsKey(id)) {
                    for (Long childId : adjacencyList.get(id)) {
                        q.add(childId);
                    }
                }
            }


            if( !numberOfDistinctUserVsFrequency.containsKey(users.size()) )
                numberOfDistinctUserVsFrequency.put(users.size(), 1);
            else {
                int freq = numberOfDistinctUserVsFrequency.get(users.size());
                numberOfDistinctUserVsFrequency.put(users.size(), freq + 1);
            }

        }

        for( Integer numUsers: numberOfDistinctUserVsFrequency.keySet() ) {
            numUsersVsFreqFileWriter.write(numUsers + "-" + numberOfDistinctUserVsFrequency.get(numUsers) + '\n');
        }

        numUsersVsFreqFileWriter.close();


    }