Blue Prism - How to find a combination of numbers and their sum out of a pre-given set of numbers?

ayush_mani

New Member
Hi All,

I am stuck at a problem. Please read on and tell me if anyone can help.

I have a set of some numbers and I have a certain another number (Say X) and I need to find atleast one combination of numbers within the set - the sum of which will give me an amount that is equal to X.
I need to use BluePrism and code this up.

for clearer understanding :

Eg : Say the set/collection of numbers is : {2,3,1,5,4,7}
and X = 10

Then one combination could be : 3+4+2+1 = 10
Others could be : 7+3 =10

I need any 1 combination that sums up to X(here X=10)

So I want either (3,4,2,1) or (7,3) or if there are any other similar arrangements stored in a unique collection as I want to deal with them in a later part of the code.

Note 1 : The numbers could also be decimal numbers.
Note 2 : The numbers are not arranged in any order(ascending/descending) initially.
Note 3 : The range of this set of numbers could range to as high as 800.
Note 4 : X surely does not belong to that set.
 
Top