1+2+3+4+5+6 = 21
1+2+3+4+5+6+7 = 28
1+2+3+4+5+6+7+8 = 36
1+2+3+4+5+6+7+8+9 = 45
Is there a tool, that can do me that job?
How do I get this List {1,3,6,10,15,21,28,36,45}?…
Added by Ahmed Hossam at 2:19pm on September 22, 2013
etc.
Group 2 - 1, 6, 11, 16, 21 etc.
Group 3 - 2, 7, 12, 17, 22 etc.
Group 4 - 3, 8, 13, 18, 23 etc.
Group 5 - 4, 9, 14, 19, 24 etc. "
except in data, the branches start at 0, so 'group 1' is branch 0
as for the order of your points, that depends on the input prior sorting...
yrs …
ng (It's a bit similar to the Knapsack problem):
I have a Variable --> XandI Have fix numbers (can we call "pieces") 9,12,15,18
I'd like to reach the X, with the summing of these numbers and using the minimum pieces ,it can't be lower than X, but it can be higher, maximum with 3.After this it has to found the most optimal combination which mostly use the same pieces
E.G.
X=98
The wrong solution is like = 1pcs of 18 = 9pcs of 9
Sum of pieces are 10
OR
= 3pcs of 18 = 1pcs of 15 = 1pcs of 12 = 2pcs of 9
Sum of pieces are 7
The right solution in this case = 5pcs of 18 = 1pcs of 9
(5*18)+(1*9)=99 it's good beacuse it's over with maximum 3 and uses the minimum pieces
Then it sends to a list like18 : 5pcs15 : 0pcs12 : 0pcs9 : 1pcsCan somebody help me ? Or is it possible to make this ?
Thank you…
Added by Petrik Kollár at 1:09am on November 10, 2017