Forum Discussion
CEdward940
Oct 19, 2023Copper Contributor
Create an array that enumerates different combinations of percentages.
Hello, I would like to create an array that enumerates all of the different ways in which 100% can be split up between 13 different letters. Is there a quick and error-free way to do this that is...
CEdward940
Oct 19, 2023Copper Contributor
Thanks Patrick. So I looked at your solution and I changed the increment to 0.05. I notice among the solutions, however, that some rows that I would expect to be there aren't. For example, the rows where each letter is 100% (and every other letter is 0%). Then there are rows where I expect a letter to be, say, 75% and another letter is 25%.
Am I missing something?
Patrick2788
Oct 20, 2023Silver Contributor
The method the formula uses to generate the Bin Matrix is taking the number of letters (13) and using that for the width of the array. The problem with 13 is it's not enough to accommodate the 20 increments for .05 where 1/.05 (.05, .10, .15, etc.). When the width is fixed at 20 (essentially replacing 'letters' with 20), it produces memory errors. Maybe it needs some more tinkering but it looks like a memory/calculation issue.
- CEdward940Oct 20, 2023Copper ContributorIs there an alternative way to do this then?
Even when I increase the increment to 10% to create far fewer possible combinations, I still don't see combos I expect to see (e.g. those combinations that assign 100% to a single letter).- Patrick2788Oct 20, 2023Silver Contributor
You could use Solver. It will give you 1 solution at a time but you can keep running it and it won't run into memory issues.