Combination of weighted prices such that the sum equals a fixed price

I have a weighted prob question. How do you find the combinations of weighted probabilities whose sum is equal to a fixed number? For example: suppose you are given a basket of fruits that have different costs. If you have a specific budget, what different ways can you spend that money.. To illustrate:

You want apples oranges and bananas and you have $3.50 to spend. Apples cost $0.50 each Oranges cost $0.20 each Bananas cost $0.89 each

Let there exist a set {a_1, a_2, a_3} such that a_1(.5) + a_2(.2) + a_3(.89) = 3.5

List the possible combinations of {a_1, a_2, a_3}

• are you talking about integer solutions for $a_i$? What does this to do with probability? – karakfa Oct 18 '19 at 18:29