@Tj_chua wrote:
Hi @FreelanceReinh,
I think i explain something wrong, we want to form groups of 8s with no remainders, so( 6 6 6 6 6 6 6 6), there are no eights that can be formed. while if we get (2 6 6 6 6 6 6 6) 1 eight can be formed.
This is greate! is it also possible to get below
1)let x - how many 8 was formed,
2)let y - how many items formed the remainder/ Was not used? istead of the remainder it self, preffer lest amount of item possible.
3)let z - how many 0.3 in the combination.
Example:
Combination x Y Z
4 4 4 2 2 1 3 .3 => 2 eights formed, 3 Items remained. remainder = 1. count for .3 items is 1
.3 .3 3 5 1 2 5 8=> 3 eights formed, 2 Items remained. remainder = .6. count for .3 items is 2
4 4 3 5 1 2 5 8=> 4 eights formed, 0 Items remained. remainder = 0. count for .3 items is 0
4 4 4 4 1 2 1 1 => 4 eights formed, 2 Items remained. remainder = 5. count for .3 items is 0 X Y ZFreq 1 0 0 ???
1 1 1 ???
1 2 2 ???
.
.
Is this possible with the array?
Thank you so much, appriciate the help.
ill try to learn the explanation code.
Your latest specifications abandon the concept of calculating sums and remainders modulo 8, which was fundamental to the development done so far. Nevertheless, there is still hope that much of the existing program could continue to be used. This is based on two facts:
the one-to-one correspondence between the values (v) and their remainders modulo 8
the invariance of the variables (to be) derived under variations of the 8-element subsets with fixed frequency distribution of values.
Unfortunately, the newly requested variable x is not well-defined.
Example: values (1 1 2 3 4 5 6 7) --> x=2? (1 1 2 3 4 5 6 7) --> x=3?
Each of our 11583 eight-element subsets can be partitioned in 4140 different ways (Bell number B8). So, even if one had to search through all 11583*4140=47,953,620 partitions to determine the maximum (or minimum) number of eights formed (i.e., a well-defined version of x), this should be feasible.
I reckon that SAS/OR provides better tools for performing such searches (in an optimized way), but I don't have a license, nor experience with this SAS module.
Therefore, I recommend that you open a new thread with updated specifications (all derived variables must be well-defined) and an adapted title. Several "SAS/OR challenges" have been answered very quickly in the past couple of months, for example this one.
Good luck! And thank you for posting such interesting questions for mathematically inclined programmers.
... View more