Math puzzle

iknowu99

Well-known Member
Joined
Dec 26, 2004
Messages
1,158
There are pairings and values are received one from each scale. Small scale numbers are always unique. We have sum of values that are used. We know that pairings are either summed or not. Based on sum we need the function to return which index in the array was used.

The goal is to build deciphering function to return which pairings were used to create the sum. For ex: Can you figure out which pairings were used to make the sum?


Excel
ABCDE
1large scale:600400800800
2small scale:50516364
3
4sum:1965
Sheet1
<br/>
 
Last edited:

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Sum of pairings that were used. Edited the original post. mikerickson, does that make sense?
 
Last edited:
Upvote 0
Each couple (pairings) may be inolved in the sum (1) or not (0). You have to implement a distribution with repetition method to cicle all possible solutions and keep only those matching your sum. I think the light is on but turns off if the pairing are a lot: for 12 pairings you have to test 2^12 possible solutions.

Bye
 
Upvote 0
Each couple (pairings) may be inolved in the sum (1) or not (0). You have to implement a distribution with repetition method to cicle all possible solutions and keep only those matching your sum. I think the light is on but turns off if the pairing are a lot: for 12 pairings you have to test 2^12 possible solutions.

Bye

how to build recursion function that returns the index of the array that is (1)?
 
Last edited:
Upvote 0
Last edited:
Upvote 0
The vertical pairs are irrlevent, right? So it just reduces to finding the combination of a set of numbers that add to a given total, a problem that has been well explored on this and other forums.
 
Upvote 0
Hello shg, not sure why you said vertical pairs were irrelevant. some of them might not count toward the sum. The task is to use code to decipher the sum to the pairings (one from large scale one from small scale).
 
Upvote 0
Right. But for a given vertical pair, you either use both or neither, so it is only their sum that matters, yes?
 
Upvote 0

Forum statistics

Threads
1,214,553
Messages
6,120,182
Members
448,948
Latest member
spamiki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top