lewisgmorris
Board Regular
- Joined
- Oct 23, 2014
- Messages
- 119
Hi All,
I have tried and tried to work my head around making lists of all unique permutations of a list of values that equal x but no luck. If any one has any idea I would apprecate it.
Its like a brute force algorithm for passwords I guess but i cant work out how to only use each value once.
Any help appreciated.
IE
TOTAL £3000
VALUES
£500
£200
£200
£100
£250
£350
£100
£275
£375
£300
£3000
£1000
£1000
£2000
ANSWER (could be multiple)
£3000,
£1000+£2000,
£1000,£1000,£200,£200,£100,£500
I have tried and tried to work my head around making lists of all unique permutations of a list of values that equal x but no luck. If any one has any idea I would apprecate it.
Its like a brute force algorithm for passwords I guess but i cant work out how to only use each value once.
Any help appreciated.
IE
TOTAL £3000
VALUES
£500
£200
£200
£100
£250
£350
£100
£275
£375
£300
£3000
£1000
£1000
£2000
ANSWER (could be multiple)
£3000,
£1000+£2000,
£1000,£1000,£200,£200,£100,£500