# 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
{"ft_lang_label":"__label__en","ft_lang_prob":0.9489005,"math_prob":0.99360436,"size":1405,"snap":"2020-45-2020-50","text_gpt3_token_len":411,"char_repetition_ratio":0.11206281,"word_repetition_ratio":0.0,"special_character_ratio":0.32170817,"punctuation_ratio":0.2027027,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9970019,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-10-20T00:56:44Z\",\"WARC-Record-ID\":\"<urn:uuid:011250a2-16de-4bb8-9a0d-69387f771717>\",\"Content-Length\":\"147478\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:8eea4909-6aa1-4424-8634-10e95b24299e>\",\"WARC-Concurrent-To\":\"<urn:uuid:ea0ccb68-edd4-4cc8-a137-c533ff6209ec>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://math.stackexchange.com/questions/3399304/combination-of-weighted-prices-such-that-the-sum-equals-a-fixed-price\",\"WARC-Payload-Digest\":\"sha1:U7BBX3W2XT3ILDKNAU4UY3FZ7ULCIMH5\",\"WARC-Block-Digest\":\"sha1:R7FIW63AH347ERDE5MHUOVU2GUZBDHT2\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-45/CC-MAIN-2020-45_segments_1603107867463.6_warc_CC-MAIN-20201019232613-20201020022613-00360.warc.gz\"}"}