public double countDistinct(String genre,int from,int to)
	{
	    provider.setStream(from,to, genre);
        
        
        Pair a =provider.getNextPair();
        int count1 =0;
        int count =0;                       
        m[0] = find();
        m[1] = find();
        m[2] = find();
        n[0] = find();
        n[1] = find();
        n[2] = find();
        while(a!=null)
        {        	           
        	count++;
        	//System.out.println(CountTrails(hash(a)));
        	bV[CountTrails(hash(a,1))]=true;
        	bV2[CountTrails(hash(a,2))]=true;
        	bV3[CountTrails(hash(a,3))]=true;
        	a = provider.getNextPair();
        	//each distinct pair generates a triangle with the genre
        	//triangles between pairs in each movie?
        	//How do we count distinct pairs?
        	
        }
        int q=0;
        for(int i =0; i<64;i++)
        {
        
        	if(!bV[i])
        		break;
        	q++;
        }
        int q2=0;
        for(int i =0; i<64;i++)
        {
        	
        	if(!bV2[i])
        		break;
        	q2++;
        }
        int q3=0;
        for(int i =0; i<64;i++)
        {
        	
        	if(!bV3[i])
        		break;
        	q3++;
        }
        
        double r = (q3+q2+q)/3.0;
        double out =2;
        out = Math.pow(2.0, r);
        
        
        
        //The next two lines find the bias and subtract it.
        double bias = 0.31/(Math.pow(2, r)); //find the bias. Very small value when r is big.
        double modifiedOut = out*(1-bias);                       
        
        
        
        return modifiedOut;
	}