thanks for the input locsin. i already created a function that will loop (1 to 5 comb) to combine the given set of numbers. the problem is im having trouble with getting the difference of the qty. for example:
---------------------------------------
combination requirement= 400
size 100+90+80+70+60
qty respectively 10,9,8,7,6
ANS:
6 set for 100+90+80+70+60
qty respectively 4,3,2,1,0
---------------------------------------
this sample is easy to compute coz of theres no redundant size have been combined. the next example will be a little bit of complicated:
----------------------------------------
combination requirement= 400
size 100+100+90+80+30
qty respectively 10,10,11,12,13
ANS:
5 sets for 100+100+90+80+30
qty respectively 0,0,6,7,8
------------------------------------------
the problem is, am having trouble with getting the difference of the qty. for now, im using a string handling function for computation of combinations but reducing the qty is my main problem using that function( ex. sorting the qty and determining the lowest qty to be the set size). can someone suggest an idea that will help me to solve my problem? thanks all.