



 
Vidya, Your problem involves what is called a RESTRICTED PARTITION. I have not seen your particular problem, but it has probably been studied extensively. You might want to start with the Wikipedia page Chris  


Math Central is supported by the University of Regina and The Pacific Institute for the Mathematical Sciences. 