// this works  with a.(b+c).(d+e)

  bool lessbdd (const bdd x, const bdd y) const  
  {
     if (model == 0)
        {
          if ( (setUnion(x,y) != y) ) return true;
          else
             {
               if ((x!=y)>0) return true;
               else return false;
             } 
          
        }
     else
       {
          if ( (bagIntersection(x,y) != x) ) return true;
          else
             {
               if ((x!=y)>0) return true;
               else return false; 
             } 

       }
     
		}
};


// latest



 struct less_bdd : public binary_function<bdd, bdd, bool> 
{
 	bool operator()(const bdd x,  const bdd y) const { return lessbdd(x,y); }

  bool lessbdd (const bdd x, const bdd y) const  
  {
    if (model == 0)
             {
               if ( (setUnion(x,y) != y) ) return true;
               else
                   if (x==y) return false; // setEquals(x,y)
                   else return true;               
             }
     else
            {
               if ( (bagIntersection(x,y) != x) ) return true;
               else
                   if (x==y) return false; //bagEquals(x,y)
                   else return true;
            }
     
		}
};


//This is working in less_bdd but slow

 for (iF1 = f1.begin(); iF1 != f1.end(); iF1++ )
     {
         //bdd_printdot(*iF1);
         family_result.insert(*iF1);
     }
   //cout << " contents of f2 " << endl;
   for (iF2 = f2.begin(); iF2 != f2.end(); iF2++ )
     {
         //bdd_printdot(*iF2);
         family_result.insert(*iF2);
     }

//      
